From: Allison N. <dem...@ma...> - 2009-02-10 10:19:49
|
Just to add to what Eloy has said, the problem is that Ruby classes don't exist at compile time, they are created by the ruby compiler at runtime, so the compiler can't know about them (with the possible exception of the built-in classes; you'd have to ask Laurent about that!). So even for MacRuby, where Ruby classes ARE Objective-C classes, you can't use static typing for Ruby objects. You'll have the compiler complaining about an unknown type, or some other syntatic error, depending on where you try to use the definition. One way to think about this is that you don't have .h files in Ruby. These files exist for precisely this reason in the various flavours of C. Hope that helps, Alli On Tuesday, February 10, 2009, at 11:11AM, "Eloy Duran" <elo...@gm...> wrote: >Hi, > >Looking at your blog post it seems you are talking about MacRuby, >which is a different project then RubyCocoa to which you have posted >this. > >Having said that, no I don't think it's possible. > >- Eloy > >On 10 feb 2009, at 09:03, S. Woodside wrote: > >> I want to call back and forth between Ruby and ObjC objects, I've >> figured it out in a basic way and posted it here: >> >> http://simonwoodside.com/weblog/2009/2/10/wondeful_joy_mix_ruby_and/ >> >> However, it would be nice if on the ObjC side I could actually declare >> objects of a type defined on the Ruby side instead of using "id"... >> and have the compiler, or at least just the linker understand that. >> Does anyone know if it's possible? >> >> --simon >> >> >> PS sorry for cross-posting with the google group, but i realized that >> it doesn't seem to be active. >> >> ------------------------------------------------------------------------------ >> Create and Deploy Rich Internet Apps outside the browser with >> Adobe(R)AIR(TM) >> software. With Adobe AIR, Ajax developers can use existing skills >> and code to >> build responsive, highly engaging applications that combine the >> power of local >> resources and data with the reach of the web. Download the Adobe AIR >> SDK and >> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > >------------------------------------------------------------------------------ >Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) >software. With Adobe AIR, Ajax developers can use existing skills and code to >build responsive, highly engaging applications that combine the power of local >resources and data with the reach of the web. Download the Adobe AIR SDK and >Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com >_______________________________________________ >Rubycocoa-talk mailing list >Rub...@li... >https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |