discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: StepTalk (ivars and c-structures)


From: Stefan Urbanek
Subject: Re: StepTalk (ivars and c-structures)
Date: Sat, 19 Feb 2005 13:51:23 +0100

On Thu, 2005-02-17 at 09:42 -0600, Matthew D Swank wrote:
> I realize you are probably very busy, but I wanted to explain why I have 
> been peppering you with email.  I am looking for a dynamic, terse, 
> garbage collected language with an interpreter that is well integrated 
> with GNUstep. StepTalk seems very close to this (certainly a lot closer 
> than any of the current external language bindings.).  However, its 
> current user-defined objects lack state, and I don't know if it can wrap 
> the C-types necessary for any non-trivial GNUstep apps.  I certainly 
> appreciate the help you have provided so far, and I would be grateful 
> for any further advise or assistance you could give me.
> 

Well, yes, i have been busy last week.

Concerning the user defined objects and their state - it should be not
difficult to implement it. What you should look at are methods:
Languages/Smaltalk/STCompiler: compileMethodFromSource:forReceiver.
There you learn, that the receiver should respond to the
'instanceVariableNames' method. Then the receiver should respond to the
instanceVariableAtIndex:. Therefore those two methods have to be
implemented in STScriptObject. Note, that the design was taken from old
smalltalk description and I think that it would be better to change that
from indexed instance variables to named instance variables. What do you
think?

Concerning the C-types: steptalk automatically tries to convert the C
structure types into a class named STStructure (see the StepTalk
framework). Return values or arguments should be converted
automatically. Problem is with structure creation as the functionality
was not fully implemented. Only some basic OpenStep types were created,
such as range, point or rect. Some of the structures can be created like
this:

10 <> 15 means NSRange where location = 10 and length = 15
10 @ 15  means NSPoint where x = 10 and y = 15
10 @@ 15 means NSSize where width = 10 and height = 15

This for sure has to be polished.

If you have more questions, do not hesitate to contact me.

Regards,

Stefan Urbanek

p.s.: If you do not mind, I am forwarding this to the list, if someone
else would be interested.
-- 
http://stefan.agentfarms.net

First they ignore you, then they laugh at you, then they fight you, then
you win.
- Mahatma Gandhi






reply via email to

[Prev in Thread] Current Thread [Next in Thread]