From: Jonathan P. <jp...@dc...> - 2006-01-06 12:08:07
|
On 3 Jan 2006, at 22:07, Aidan Rogers wrote: > How do I go about wrapping an existing ObjC class? Is there an > example somewhere I can work from, or some documentation? Could you be more specific about what you're trying to do? Is it a class from AppKit/Foundation you want to deal with that's not yet supported in RubyCocoa, or some ObjC class of your own devising? If it's the latter, you can pretty much just use it like this: # Do this once to create the Ruby classes corresponding to the ObjC classes OSX.ns_import :YourClassName # Then use the class obj = OSX::YourClassName.alloc.init obj.someMethod("hello") |