Re: [F-Script-talk] Dictionary and a shell command wanted :)
Brought to you by:
pmougin
From: Felix F. <fe...@gm...> - 2006-08-24 08:44:39
|
> Hi all, > I am a very strong Squeak fan and I liked a lot FScript. me too :) > I decided to use Fscript to write some small front-end script. > I have two question. > There is a simple way of creating an associative array? > Something which will be able to do: > dic at:'a' put:'aValue' > ? you can use a NSMutableDictionary: > dict := NSMutableDictionary new > dict setObject: 'foo' forKey: 'bar' > dict objectForKey: 'bar' 'foo' > And how is possible to execute arbitrary shell commands (something > like the exec() or system() C function)? The cocoa-way would be to use NSTask: > task := NSTask launchedTaskWithLaunchPath:'/bin/ls' arguments: NSArray array launches /bin/ls . See http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html for the glory details. Hope this helps, felix > Thank you very much! > -- > [ [ [ JJ ] ] ] | Temi cio' che conosci, non > | cio' che non conosci > http://www.siforge.org | > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk -- . "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail |