From: Jonathan P. <jp...@dc...> - 2005-12-05 21:13:01
|
On 5 Dec 2005, at 21:00, Rupert BARROW wrote: > Of course, this is what we do for OSX (Cocoa) objects, but I have > never created an instance in Ruby from a custom Objective-class. > How would you go about doing this, especially in a headless > application, for a Model or Controller Objective-C class ? Are you talking about a class you have created natively in Objective C that you want to extend in Ruby-land? If so, you need to do OSX.ns_import :YourClassName After that, a new class under the OSX module will be created with the appropriate name. You can then subclass it as you do with other built- in classes: class MySubclass < OSX::YourClassName ... end Please let me know if I've misunderstood. Cheers, Jonathan |