Skip to content

Commit a9a2497

Browse files
authored
Merge pull request #289 from badetitou/patch-5
Propose some tab fixes
2 parents 50c78bc + b510484 commit a9a2497

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

General/SessionsManagement.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ You need to do those actions in a `#startUp:` method and `#shutDown:` method on
1919

2020
```Smalltalk
2121
MyClass class>>startUp: isImageStarting
22-
isImageStarting
23-
ifTrue: [ MyVariable := FileLocator home asFileReference ]
22+
isImageStarting
23+
ifTrue: [ MyVariable := FileLocator home asFileReference ]
2424
```
2525

2626
```Smalltalk
2727
MyClass class>>shutDown: isImageQuitting
28-
isImageQuitting
29-
ifTrue: [ MyVarible := nil ]
28+
isImageQuitting
29+
ifTrue: [ MyVarible := nil ]
3030
```
3131

3232
Then you need to register the class in the `SessionManager` of Pharo. This is usually done in the `#initialize` method (class-side).
3333

3434
```Smalltalk
3535
MyClass class>>initialize
36-
SessionManager default registerUserClassNamed: self name.
37-
self startUp: true. "Here we execute it to set up the value while loading the project."
36+
SessionManager default registerUserClassNamed: self name.
37+
self startUp: true. "Here we execute it to set up the value while loading the project."
3838
```
3939

4040
## Register a class to the session manager
@@ -45,14 +45,14 @@ The simplest way to do that is to add this in the class initialization method of
4545

4646
```Smalltalk
4747
MyClass class>>initialize
48-
SessionManager default registerUserClassNamed: self name
48+
SessionManager default registerUserClassNamed: self name
4949
```
5050

5151
Sometimes, the order of execution of start-up/shut-down actions might matter. To manage this, it is possible to set a priority.
5252

5353
```Smalltalk
5454
MyClass class>>initialize
55-
SessionManager default registerUserClassNamed: self name atPriority: 60
55+
SessionManager default registerUserClassNamed: self name atPriority: 60
5656
```
5757
Registered handlers with lower priority will be executed first.
5858
The actions registered using `#registerUserClassNamed:[atPriority:]` will have a low priority in the startup/shutdown list.

0 commit comments

Comments
 (0)