Thursday, June 23, 2005

integration in Gorm..

I have now a reasonably-working StepTalkClass implementing inheritance -- you can inherits from other StepTalkClass instances or from a normal ObjC class (well, only the methods.. the ivars aren't inherited..). I also started a new inspector in Gorm for managing a StepTalkClass, where you can add ivars and methods, and if you modify a variable in your method the variable correctly changes (eh, useful no ? ;-)

On the other hand, the object model is rather simple -- I don't have classes and instances, I just define ivars and methods. But for a first version that will be enough for most of the needs (you don't really use lots of instances in general for dealing with the UI..), although I think I will implements a class/instance system anyway (I have a StepTalkRuntime that keep tracks of the created classes..)

I have a slight problem at the moment, calling directly a "script method" in a StepTalkClass works, but for some reasons it doesn't in Gorm, so I need to investigate... it's a bit odd as I inform Gorm of the methods, and I can link a button to a method; I implement respondsToSelector: in StepTalkClass, but somehow I don't even get the message... well I'll see that this evening.

I had some problems with NSMethodSignature, by default the StepTalkClass methods returned an object and took only objects as parameters; so it was easy to build the signature (I actually used a convenient method available in STObjCRuntime). But for actions in gorm, the methodsignature must apparently have a void return value.. so I need to allow signature creation with different return values. Setting the signature by hand make it works though, so it won't be difficult. The other problem is that I can't seem to be able to return an int (not an object) from a script method, even if the NSMethodSignature is correct: I end up with a vacall error when I set the return value of the NSInvocation... I need to find a way, else it will be difficult to create for example NSTableView delegates ! :-)

Anyway, I hope that i'll be able to fix the remaining bugs soon and make a release. At least with it you will be able to create for example a calculator completely in Gorm (as in I think I'll make a flash video to show how it works :-)

No comments: