Howdy!
I'd like some morphs to update themselves when the image is started, but I don't see a convenient "image started" hook to attach to. Can someone suggest a way?
(The morphs are supposed to present a directory based on the files in some directory and I want to be able to maintain those files separately from the image.)
Hacking SmalltalkImage>>snapshot:andQuit:embedded: is tempting but perhaps excessively kludgy. :-)
Cheers, -Luke
El 1/28/08 5:47 AM, "Luke Gorrie" lukego@gmail.com escribió:
Howdy!
I'd like some morphs to update themselves when the image is started, but I don't see a convenient "image started" hook to attach to. Can someone suggest a way?
(The morphs are supposed to present a directory based on the files in some directory and I want to be able to maintain those files separately from the image.)
Hacking SmalltalkImage>>snapshot:andQuit:embedded: is tempting but perhaps excessively kludgy. :-)
Cheers, -Luke
You could have some class named MyStart, with class method startUp with your code. Then do Smalltalk addToStartUpList: MyStart in Workspace.
Ready !
Sure and don't forget you should use the method to indicate where in the StartUpList: you want your class to start up. There is a method to indicate which class you should be before, or is that after? We know this by heart because we got burned with it in Sophie early on. Yes we do want to start the FreeType/Rome subsystem *before* Morphic starts....
Otherwise your Class startup gets added somewhere in the sequential starutp list, maybe not where you expect.
On Jan 28, 2008, at 1:57 AM, Edgar J. De Cleene wrote:
You could have some class named MyStart, with class method startUp with your code. Then do Smalltalk addToStartUpList: MyStart in Workspace.
Ready !
-- = = = ======================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ========================================================================
"Edgar J. De Cleene" edgardec2001@yahoo.com.ar writes:
You could have some class named MyStart, with class method startUp with your code. Then do Smalltalk addToStartUpList: MyStart in Workspace.
Thanks!
Is there a simple way that I could make this happen automatically upon either loading my code from Monticello or loading my Project file? I know that ChangeSets have a mechanism along these lines and I could use a pointer to an example or somesuch.
Cheers, -Luke
Luke Gorrie lukego@gmail.com writes:
Is there a simple way that I could make this happen automatically upon either loading my code from Monticello or loading my Project file?
OK, now I reckon I see how 'postscript's work in ChangeSets and Monticello repositories.
Unfortunately when I use the Monticello feature 'Edit postscript' with Monticello version kph-434 in the OLPC XO image I end up in the debugger with "MessageNotUnderstood: PackageInfo>>postscript"
Any ideas? Or is that too XO-specific for this list?
Cheers, -Luke
Luke Gorrie wrote:
Luke Gorrie lukego@gmail.com writes:
Is there a simple way that I could make this happen automatically upon either loading my code from Monticello or loading my Project file?
OK, now I reckon I see how 'postscript's work in ChangeSets and Monticello repositories.
Unfortunately when I use the Monticello feature 'Edit postscript' with Monticello version kph-434 in the OLPC XO image I end up in the debugger with "MessageNotUnderstood: PackageInfo>>postscript"
Any ideas? Or is that too XO-specific for this list?
Cheers, -Luke
Try an upto date version of PackageInfo from http://www.squeaksource.com/mc
You might also consider trying updating all of the package loading stuff via the LevelPlayingField script at http://installer.pbwiki.com/
best regards
Keith
im not, but it looks really cool!
On Jan 28, 2008 7:28 AM, rfh@atnet.at wrote:
anybody involved in this?
http://www.gamasutra.com/php-bin/news_index.php?story=16503
cheers, rfh
El 1/28/08 8:16 AM, "Luke Gorrie" lukego@gmail.com escribió:
OK, now I reckon I see how 'postscript's work in ChangeSets and Monticello repositories.
Unfortunately when I use the Monticello feature 'Edit postscript' with Monticello version kph-434 in the OLPC XO image I end up in the debugger with "MessageNotUnderstood: PackageInfo>>postscript"
Any ideas? Or is that too XO-specific for this list?
"Normal" Monticello don't have preamble or postcript. For Normal I meant the version on 3.10 , which Ralph modify for we in release team use. But Monticello have several flavors and Impara have versions which manage preamble and postcript. Another posibility is your have your own how to. Add a class method #processMonticello which in turns call your own #preamble and #postcript.
Steal of ChangeSets , your codes should be some like processMonticello self preamble. self load: myExternalThing. self postcript
and in Workspace you do
Mystuff processMonticello
Next question ? :=)
Edgar
Edgar J. De Cleene wrote:
El 1/28/08 8:16 AM, "Luke Gorrie" lukego@gmail.com escribió:
OK, now I reckon I see how 'postscript's work in ChangeSets and Monticello repositories.
Unfortunately when I use the Monticello feature 'Edit postscript' with Monticello version kph-434 in the OLPC XO image I end up in the debugger with "MessageNotUnderstood: PackageInfo>>postscript"
Any ideas? Or is that too XO-specific for this list?
"Normal" Monticello don't have preamble or postcript. For Normal I meant the version on 3.10 , which Ralph modify for we in release team use.
Monticello in 3.10 DOES have preamble and postcript support. However the version of packageInfo in 3.10 does not. The same is probably true of the OLPC images.
LevelPlayingField is designed to work on all images including the XO. I havent tried it yet but Matthew has.
Keith
On Mon, Jan 28, 2008 at 07:15:24PM +0000, Keith Hodges wrote:
LevelPlayingField is designed to work on all images including the XO. I havent tried it yet but Matthew has.
Works great. Etoys-2.3 with LPF is the only image I am using right now, and the one I am building DeltaStreams with. I made a couple of fixes to Installer and Monticello so that LPF loads cleanly on etoys images. It still asks if you want to update SqueakMap, though.
i want to do a similar thing, except, i want my image to run roundUpStrays on startup, how do i do that?
On Jan 28, 2008 10:14 PM, Matthew Fulmer tapplek@gmail.com wrote:
On Mon, Jan 28, 2008 at 07:15:24PM +0000, Keith Hodges wrote:
LevelPlayingField is designed to work on all images including the XO. I havent tried it yet but Matthew has.
Works great. Etoys-2.3 with LPF is the only image I am using right now, and the one I am building DeltaStreams with. I made a couple of fixes to Installer and Monticello so that LPF loads cleanly on etoys images. It still asks if you want to update SqueakMap, though.
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
You have to add your class to the startup list.
search for senders of addToStartUpList:
You'll find they are usually class side initialize methods and that those classes also implement class method startUp - which is called after an image is opened.
There is a corresponding shutDown list as well.
On Jan 29, 2008, at 2:52 PM, David Zmick wrote:
i want to do a similar thing, except, i want my image to run roundUpStrays on startup, how do i do that?
On Jan 28, 2008 10:14 PM, Matthew Fulmer tapplek@gmail.com wrote: On Mon, Jan 28, 2008 at 07:15:24PM +0000, Keith Hodges wrote:
LevelPlayingField is designed to work on all images including the
XO. I
havent tried it yet but Matthew has.
Works great. Etoys-2.3 with LPF is the only image I am using right now, and the one I am building DeltaStreams with. I made a couple of fixes to Installer and Monticello so that LPF loads cleanly on etoys images. It still asks if you want to update SqueakMap, though.
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
On Jan 28, 2008, at 11:44 , Luke Gorrie wrote:
"Edgar J. De Cleene" edgardec2001@yahoo.com.ar writes:
You could have some class named MyStart, with class method startUp with your code. Then do Smalltalk addToStartUpList: MyStart in Workspace.
Thanks!
Is there a simple way that I could make this happen automatically upon either loading my code from Monticello or loading my Project file?
Sure. That's why everyone puts that call into a class initialize method. You know about "browse senders", don't you? ;)
- Bert -
Bert Freudenberg bert@freudenbergs.de writes:
Sure. That's why everyone puts that call into a class initialize method. You know about "browse senders", don't you? ;)
Thanks smart-pants. :-)
Hi Luke,
Luke Gorrie wrote:
Is there a simple way that I could make this happen automatically upon either loading my code from Monticello or loading my Project file? I know that ChangeSets have a mechanism along these lines and I could use a pointer to an example or somesuch.
You can simply put a startup registration code into class method #initialize of one of your classes. This method will be called every time you load a package consisting that class.
Best regards JAnko
On Mon, 28 Jan 2008 06:57:21 -0300, "Edgar J. De Cleene" edgardec2001@yahoo.com.ar wrote:
You could have some class named MyStart, with class method startUp with your code. Then do Smalltalk addToStartUpList: MyStart in Workspace.
Actually, the class side method you need to implement is #startUp:
The argument is a boolean, to say whether the image is a fresh start or resuming from an image save.
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Raptor (Small Biped Velociraptor Robot) http://www.huv.com/blog
On Jan 28, 2008, at 14:03 , Jon Hylands wrote:
On Mon, 28 Jan 2008 06:57:21 -0300, "Edgar J. De Cleene" edgardec2001@yahoo.com.ar wrote:
You could have some class named MyStart, with class method startUp with your code. Then do Smalltalk addToStartUpList: MyStart in Workspace.
Actually, the class side method you need to implement is #startUp:
The argument is a boolean, to say whether the image is a fresh start or resuming from an image save.
Actually actually, the inherited implementation of #startUp: sends #startUp.
So if you do not care if it is a fresh start or snapshot, implement #startUp.
- Bert -
On Mon, 28 Jan 2008 14:25:32 +0100, Bert Freudenberg bert@freudenbergs.de wrote:
Actually actually, the inherited implementation of #startUp: sends #startUp.
Wow, that's pretty funny - I've been doing this (using startUp:) for years without realizing that.
So if you do not care if it is a fresh start or snapshot, implement #startUp.
I guess it depends on what you're doing... For me, what happens at image startup (launching a mission) is different from what happens resuming a save (nothing).
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Raptor (Small Biped Velociraptor Robot) http://www.huv.com/blog
squeak-dev@lists.squeakfoundation.org