Command Line Squeak/Scripting: Status?
Jon Hylands
jon at huv.com
Fri Feb 9 11:45:10 UTC 2007
On Fri, 9 Feb 2007 02:53:25 -0600, Aaron Reichow <areichow at ipharos.com>
wrote:
> So, what's up with Squeak for this sort of setup? What are my
> options? Do I have any useable ones?
You can pass (and access) command line arguments in squeak - I do it all
the time in my headless images.
Look at implementers of #getSystemAttribute:
This is what the beginning of my startup method (class-side) looks like:
startUp: resuming
| parameter |
resuming
ifFalse: [^self].
parameter := Smalltalk getSystemAttribute: 2.
parameter isNil
ifTrue: [^self].
parameter asLowercase = '-runmission'
ifTrue: [
self runMission.
Smalltalk quitPrimitive].
...
Then you need to register whatever class that method is implemented in:
initialize
Smalltalk addToStartUpList: self
Run the initialize method, and then save and quit.
Later,
Jon
--------------------------------------------------------------
Jon Hylands Jon at huv.com http://www.huv.com/jon
Project: Micro Raptor (Small Biped Velociraptor Robot)
http://www.huv.com/blog
More information about the Squeak-dev
mailing list
|