From: Ferhat A. <fer...@ya...> - 2008-04-14 11:20:17
|
are you sure that [dataSource dimensions]; returns an NSSize? Ferhat ----- Original Message ---- From: Knud Hinnerk Möller <knu...@de...> To: rub...@li... Sent: Monday, April 14, 2008 12:56:52 PM Subject: [Rubycocoa-talk] Importing Ruby Classes into Obj-C code Hi, please forgive me if this is a stupid question to ask, but is it possible to import a Ruby class definition into Obj-C? What I mean is this: I have a RubyCocoa class: class KNTiledMap < OSX::NSObject attr_accessor :dimensions ... end I have an Obj-C class in which I want to use the Ruby class: @interface KNTileView : NSView { KNTiledMap *dataSource; } @implementation KNTileView ... NSSize originalSize = [dataSource dimensions]; ... @end This leads to a compile "error: invalid initializer". How can I make this work? Cheers, Knud ------------------------------------------------- Knud Möller, MA +353 - 91 - 495086 Smile Group: http://smile.deri.ie Digital Enterprise Research Institute National University of Ireland, Galway Institiúid Taighde na Fiontraíochta Digití Ollscoil na hÉireann, Gaillimh ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Rubycocoa-talk mailing list Rub...@li... https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ |