Re: [Pyobjc-dev] F-script may be worth a look
Brought to you by:
ronaldoussoren
From: Peter M. <zig...@po...> - 2002-11-25 10:55:02
|
On Saturday, November 23, 2002, at 10:10 AM, Jack Jansen wrote: > I just had a quick look at F-Script (www.fscript.org). It's a > smalltalk lookalike that includes access to all of Cocoa, and it comes > with a class browser and such niceties. Yep. I haven't looked at it since Jaguar came out. There is an F-Script add-on called F-Script Anywhere that lets you load an F-Script interpreter into any running Cocoa application. This is useful for exploring a third party app to see what classes it is using. Anyway, that's kind of OT. > It comes with source, so there might be some ideas about solutions to > problems we have(or have had in the past:-). Although: it may be that > you can send messages from fscript to ObjC but not the other way. I > haven't looked long enough to be sore. It *does* work the other way but AFAIK you can't really create a new class in F-Script or subclass a Cocoa class. It has a mechanism called a block which lets you wrap up a bit of F-Script code in an object. This object (IIRC) responses to the value: selector. For example, you can create a block and set it as the target of an NSButton and set the action to the selector #value. This works but it is nowhere near as elegant or as powerful as what PyObjC can currently do. It may still be interesting to look at because there is a lot of common ground and, as Jack mentioned, it is open source. On another note, has anyone here looked at CamelBones? I'm not really a Perl person but has anyone looked at how it does the Perl-ObjC bridge? Could be interesting. Peter |