Skip to content

Commit 54939e2

Browse files
Changed prefix from Lt to Cm.
1 parent 871760a commit 54939e2

File tree

62 files changed

+370
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+370
-370
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Class {
2-
#name : #LtChangePhoneCommand,
3-
#superclass : #LtContactBookCommand,
2+
#name : #CmChangePhoneCommand,
3+
#superclass : #CmContactBookCommand,
44
#instVars : [
55
'newPhone'
66
],
77
#category : #'Lieutenant-ContactBook-Extensions'
88
}
99

1010
{ #category : #hooks }
11-
LtChangePhoneCommand >> execute [
11+
CmChangePhoneCommand >> execute [
1212
"One should never manipulate UI directly from a commande.
1313
Instead, you can use one of the subclass of LtCommandNotification.
1414
The UI interactions will be handled by the command decorator.
@@ -19,19 +19,19 @@ LtChangePhoneCommand >> execute [
1919
]
2020

2121
{ #category : #initialization }
22-
LtChangePhoneCommand >> initialize [
22+
CmChangePhoneCommand >> initialize [
2323
super initialize.
2424
self
2525
basicName: 'Change phone';
2626
basicDescription: 'Change the phone number of the contact.'
2727
]
2828

2929
{ #category : #accessing }
30-
LtChangePhoneCommand >> newPhone [
30+
CmChangePhoneCommand >> newPhone [
3131
^ newPhone
3232
]
3333

3434
{ #category : #accessing }
35-
LtChangePhoneCommand >> newPhone: anObject [
35+
CmChangePhoneCommand >> newPhone: anObject [
3636
newPhone := anObject
3737
]

Lieutenant-ContactBook-Extensions/LtContactBookPresenter.extension.st renamed to Lieutenant-ContactBook-Extensions/CmContactBookPresenter.extension.st

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Extension { #name : #LtContactBookPresenter }
1+
Extension { #name : #CmContactBookPresenter }
22

33
{ #category : #'*Lieutenant-ContactBook-Extensions' }
4-
LtContactBookPresenter class >> changePhoneCommandWith: presenter forRootGroup: aLtCommandsGroup [
4+
CmContactBookPresenter class >> changePhoneCommandWith: presenter forRootGroup: aLtCommandsGroup [
55
<lieutenantExtension>
66
(aLtCommandsGroup / 'Edition') "Inject an additional command in 'Edition' group."
77
register: (LtChangePhoneCommand forSpec context: presenter)
88
]
99

1010
{ #category : #'*Lieutenant-ContactBook-Extensions' }
11-
LtContactBookPresenter class >> extraCommandsWith: presenter forRootGroup: aLtCommandsGroup [
11+
CmContactBookPresenter class >> extraCommandsWith: presenter forRootGroup: aLtCommandsGroup [
1212
<lieutenantExtension>
1313
aLtCommandsGroup
1414
register: ((LtCommandsGroup named: 'Extra') asSpecGroup

Lieutenant-ContactBook/LtAddContactCommand.class.st renamed to Lieutenant-ContactBook/CmAddContactCommand.class.st

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
I am a command allowing to add a contact.
33
"
44
Class {
5-
#name : #LtAddContactCommand,
6-
#superclass : #LtContactBookCommand,
5+
#name : #CmAddContactCommand,
6+
#superclass : #CmContactBookCommand,
77
#category : #'Lieutenant-ContactBook-Commands'
88
}
99

1010
{ #category : #converting }
11-
LtAddContactCommand >> asSpecCommand [
11+
CmAddContactCommand >> asSpecCommand [
1212
"Here we define the additional information that the command will need to know
1313
when used in Spec framework.
1414
"
@@ -18,7 +18,7 @@ LtAddContactCommand >> asSpecCommand [
1818
]
1919

2020
{ #category : #hooks }
21-
LtAddContactCommand >> execute [
21+
CmAddContactCommand >> execute [
2222
"One should never manipulate UI directly from a commande.
2323
Instead, you can use one of the subclass of LtCommandNotification.
2424
The UI interactions will be handled by the command decorator.
@@ -34,7 +34,7 @@ LtAddContactCommand >> execute [
3434
]
3535

3636
{ #category : #initialization }
37-
LtAddContactCommand >> initialize [
37+
CmAddContactCommand >> initialize [
3838
super initialize.
3939
self
4040
basicName: 'New contact'; "This is the name of the command that will be shown to user."

Lieutenant-ContactBook/LtContact.class.st renamed to Lieutenant-ContactBook/CmContact.class.st

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
I model a contact, I have a name and a phone.
33
"
44
Class {
5-
#name : #LtContact,
5+
#name : #CmContact,
66
#superclass : #Object,
77
#instVars : [
88
'name',
@@ -12,34 +12,34 @@ Class {
1212
}
1313

1414
{ #category : #'instance creation' }
15-
LtContact class >> named: aString phone: phone [
15+
CmContact class >> named: aString phone: phone [
1616
^self new
1717
name: aString;
1818
phone: phone
1919
]
2020

2121
{ #category : #accessing }
22-
LtContact >> name [
22+
CmContact >> name [
2323
^ name
2424
]
2525

2626
{ #category : #accessing }
27-
LtContact >> name: anObject [
27+
CmContact >> name: anObject [
2828
name := anObject
2929
]
3030

3131
{ #category : #accessing }
32-
LtContact >> phone [
32+
CmContact >> phone [
3333
^ phone
3434
]
3535

3636
{ #category : #accessing }
37-
LtContact >> phone: anObject [
37+
CmContact >> phone: anObject [
3838
phone := anObject
3939
]
4040

4141
{ #category : #printing }
42-
LtContact >> printOn: aStream [
42+
CmContact >> printOn: aStream [
4343
super printOn: aStream.
4444

4545
aStream nextPut: $(.

Lieutenant-ContactBook/LtContactBook.class.st renamed to Lieutenant-ContactBook/CmContactBook.class.st

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
I am a contact book. I hold a list of contacts.
33
"
44
Class {
5-
#name : #LtContactBook,
5+
#name : #CmContactBook,
66
#superclass : #Object,
77
#instVars : [
88
'contents'
@@ -15,7 +15,7 @@ Class {
1515
}
1616

1717
{ #category : #accessing }
18-
LtContactBook class >> coworkers [
18+
CmContactBook class >> coworkers [
1919
^coworkers ifNil: [
2020
coworkers := self new
2121
add: 'Stef' phone: '112 378';
@@ -25,7 +25,7 @@ LtContactBook class >> coworkers [
2525
]
2626

2727
{ #category : #accessing }
28-
LtContactBook class >> family [
28+
CmContactBook class >> family [
2929
^family ifNil: [
3030
family := self new
3131
add: 'John' phone: '342 345';
@@ -35,53 +35,53 @@ LtContactBook class >> family [
3535
]
3636

3737
{ #category : #accessing }
38-
LtContactBook class >> reset [
38+
CmContactBook class >> reset [
3939
<script>
4040
coworkers := nil.
4141
family := nil
4242
]
4343

4444
{ #category : #accessing }
45-
LtContactBook >> add: contactName phone: phone [
45+
CmContactBook >> add: contactName phone: phone [
4646
| contact |
4747
contact := LtContact named: contactName phone: phone.
4848
self addContact: contact.
4949
^contact
5050
]
5151

5252
{ #category : #accessing }
53-
LtContactBook >> addContact: aContact [
53+
CmContactBook >> addContact: aContact [
5454
contents add: aContact
5555
]
5656

5757
{ #category : #accessing }
58-
LtContactBook >> addContact: newContact after: contactAfter [
58+
CmContactBook >> addContact: newContact after: contactAfter [
5959
contents add: newContact after: contactAfter
6060
]
6161

6262
{ #category : #accessing }
63-
LtContactBook >> contents [
63+
CmContactBook >> contents [
6464
^ contents
6565
]
6666

6767
{ #category : #accessing }
68-
LtContactBook >> contents: anObject [
68+
CmContactBook >> contents: anObject [
6969
contents := anObject
7070
]
7171

7272
{ #category : #testing }
73-
LtContactBook >> includesContact: aContact [
73+
CmContactBook >> includesContact: aContact [
7474
^ contents includes: aContact
7575

7676
]
7777

7878
{ #category : #initialization }
79-
LtContactBook >> initialize [
79+
CmContactBook >> initialize [
8080
super initialize.
8181
contents := OrderedCollection new.
8282
]
8383

8484
{ #category : #accessing }
85-
LtContactBook >> removeContact: aContact [
85+
CmContactBook >> removeContact: aContact [
8686
contents remove: aContact
8787
]

Lieutenant-ContactBook/LtContactBookCommand.class.st renamed to Lieutenant-ContactBook/CmContactBookCommand.class.st

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ I am an abstract command for the contact book example.
44
I define methods to access information in my #context more easily.
55
"
66
Class {
7-
#name : #LtContactBookCommand,
8-
#superclass : #LtCommand,
7+
#name : #CmContactBookCommand,
8+
#superclass : #CmCommand,
99
#category : #'Lieutenant-ContactBook-Commands'
1010
}
1111

1212
{ #category : #accessing }
13-
LtContactBookCommand >> contactBook [
13+
CmContactBookCommand >> contactBook [
1414
"Again, this is totally optional, it justs make access to selected contact easier.
1515
Thus code in #execute is easier to read.
1616
"
1717
^ self contactBookPresenter contactBook
1818
]
1919

2020
{ #category : #accessing }
21-
LtContactBookCommand >> contactBookPresenter [
21+
CmContactBookCommand >> contactBookPresenter [
2222
"Optional, simply aliasing the context (the LtContactBookPresenter) to a more explicit name.
2323
It will just make the code easier to read in #execute methods of my subclasses.
2424
"
2525
^ self context
2626
]
2727

2828
{ #category : #testing }
29-
LtContactBookCommand >> hasSelectedContact [
29+
CmContactBookCommand >> hasSelectedContact [
3030
^ self contactBookPresenter isContactSelected
3131
]
3232

3333
{ #category : #accessing }
34-
LtContactBookCommand >> selectedContact [
34+
CmContactBookCommand >> selectedContact [
3535
"Again, this is totally optional, it justs make access to selected contact easier.
3636
Thus code in #execute is easier to read.
3737
"

0 commit comments

Comments
 (0)