help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] How does one fileout a class. Also is there a shell


From: Stephen Woolerton
Subject: Re: [Help-smalltalk] How does one fileout a class. Also is there a shell command call
Date: Wed, 29 Aug 2007 09:21:55 +1200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)



As you can see, the code isn't being printed. What would be the command to print the method code in the Account class?

That's a bug. :-)

Are you using readline or not (i.e., can you edit the lines you enter into gst using left/right arrow, and recall the history using up/down arrow)?
OK. Am using standard 2.3.3 package in Gentoo Linux. Readline works in the st environment on this machine. I can contact the package maintainer - at least I know now I had the right instruction.


    Smalltalk addSubspace: #Scripting.
    Namespace current: Scripting.

However, all classes can be obtained with "Object withAllSubclasses" if you prefer a prefix. (I just added "nil allSubclasses" to GNU Smalltalk trunk, which will also give other classes that, like "Autoload", derive directly from nil).
Thank you


Also, GNU Smalltalk does not use the image that much. You just build the image on the fly, starting from a basic one, by loading one or more files.
I see. That is a better way of doing it and easier to maintain scripts.


Thirdly, is there a way to make an operating system shell call and retrieve the output of the call. For instance is it possible to submit "ls -l /etc" to the operating system and to get the output of this command?

Yes:

    pipe := FileStream popen: 'ls -l /etc' dir: FileStream read.
    pipe contents

This is gold so far as bash scripting goes! I was hoping there was a way. Thank you.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]