From: Rupert B. <rup...@fr...> - 2005-12-05 21:01:01
|
Thanks Jonathan, Of course, this is what we do for OSX (Cocoa) objects, but I have =20 never created an instance in Ruby from a custom Objective-class. How =20 would you go about doing this, especially in a headless application, =20 for a Model or Controller Objective-C class ? Rup Le 5 d=C3=A9c. 05 =C3=A0 18:47, Jonathan Paisley a =C3=A9crit : > > On 4 Dec 2005, at 18:50, Rupert BARROW wrote: > >> I would like to develop a headless tool (app without a GUI) with =20 >> RubyCocoa : how can I create (in Ruby) Objective-C objects ? It's =20= >> difficult to #import header.h files :-) , or to connect with =20 >> ib_outlets ! > > You can probably do it already. You don't need to import any header =20= > files - most of the classes you need will have been imported into =20 > ruby (see the appkit.rb, foundation.rb files etc in RubyCocoa). > > Does that make sense? > > > require 'osx/cocoa' > include OSX > > object =3D NSWhatever.alloc.initWithWhatever:... > > > |