Re: [F-Script-talk] Dictionary and a shell command wanted :)
Brought to you by:
pmougin
From: Giovanni G. <dai...@gm...> - 2006-08-24 09:48:33
|
Thank you very much! I have poked around the Cocoa library and seems very simple to use with FScript :) Is planned some new extension to the language for creating small classes in Fscript language itself? There are FScript porting to other O.S. for instance Linux and Windows? On 8/24/06, Philippe Mougin <pm...@ac...> wrote: > > Le 24 ao=FBt 06 =E0 10:44, Felix Franz a =E9crit : > > [...] > > > > >> 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 :=3D 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. > > > > In addition, creating an Objective-C wrapper for a function like > system() and loading it in F-Script (see section 11 in the F-Script > guide) would be trivial (if you can program in Objective-C). > Something like this in Objective-C: > > -(int)executeInShell:(NSString *)str > { > return system([str UTF8String]); > } > > Best, > > Philippe > > > > > ------------------------------------------------------------------------- > 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 ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk > --=20 Software Architect http://www.objectsroot.com/ Software is nothing |