Friday, June 17, 2005

StepTalkClass !

Well, after messing a bit, I have now the following code working:

@implementation Transcript
+ (void) show: (NSString*) str
NSLog (@"<Transcript> %@", str);


StepTalkClass* myClass = [[StepTalkClass alloc] init];

[myClass setName: @"NewClass"];

[myClass addIVar: @"Transcript"];
[myClass setTranscript: [Transcript class]];

[myClass addMethod: @"display: str"
withContent: @"Transcript show: str."];
[myClass display: @"Hello World!"];


<Transcript> Hello World!



Basically, it means I have objects written using StepTalk, integrated in the ObjC runtime. So what it really means is that we'll be able to develop complete applications in StepTalk, directly in Gorm :-)

Well, I still need to do a bit of work -- I need to hook that into the StepTalk palette, and add a reasonably good class browser in Gorm for theses "Steptalk classes", but it shouldn't be to complex.

I will probably have a Smalltalk-like browser, and in the future I'll try to implement some of the ideas described here...

Also, as the metamodel is easily modifiable (obviously :), it's possible to implement interesting things... first, I need to implement single inheritance, categories, class methods, class variables to the current simple model...

No comments: