|
From: | Brian Powell |
Subject: | Re: Attempting to Create Obj-C Gecko Framework |
Date: | Mon, 9 Apr 2001 21:00:31 -0600 |
On Monday, April 9, 2001, at 07:28 PM, Pascal Bourguignon wrote:
Writting C functions could do the job, but this would probably be quite labor intensive. A better way would be, IMHO, to take advantage of the dynamical aspect of Objective-C. Have a look at objc/objc.h and objc/objc-api.h. The Objective-C machinery is published as C functions that you can use directly from C++. You could write a single C++ class "ObjC" that would allow you to instanciate Objective-C objects and to send them Objective-C messages. Minimally, something like this:
Pascal, thank you for the suggestion. I will look into this and make some small demos. The only question regarding that is how would the ObjC make a corresponding call to C++? That is why I believed that a C wrapper may be the requirement.
Note however that the Objective-C runtimes have some differences in GNUstep and MacOSX, which means that two versions of this ObjC class (or two concrete subclasses) would have to be written
No problem, I would tend to believe that once I've figured out how to do it, it shouldn't be TOO terribly different between the two (famous last words). Isn't Apple contributing their gcc version of objc back to egcs?
Thanks for the support! --Brian
[Prev in Thread] | Current Thread | [Next in Thread] |