Randal's comment on that post - I have included his version in this post - came at the exact moment I happened to be reading another of his entries, which addressed configuring the startup/shutdown issue. So, my default application settings will now contain something like this:
MyClass class >> initialize
self registerAsApplication: #foo.
Smalltalk addToStartUpList: self.
Smalltalk addToShutDownList: self.
self startUp.
MyClass class >> #registerAsApplication: name
^(super registerAsApplication: name)
libraries add: SULibrary;
preferenceAt: #sessionClass put: FooSession;
yourself.
MyClass class >> startUp
self start. "in case I want more things here"
MyClass class >> start
WAKom default.
... other stuff if I want it...
HttpService startOn: 9090 named: 'httpd'.
MyClass class >> shutDown
self stop.
MyClass class >> stop
HttpService allInstancesDo: [:each | each stop. each unregister].
No comments:
Post a Comment