From: Rupert B. <rup...@fr...> - 2007-06-27 01:36:11
|
Hi, I have had a look at RbBundleInit and the RubyAnywhere example. This is fine if you are loading a specific bundle, and wish to start it up straight away. In my case, I wish to load pieces of my app which are spread out in plugins, then start the app engine which will use the plugins which have declared themselves. The RBBundleInit loads a ruby file; in previous versions of RubyCocoa, I used to use [[NSClassFromString (@"PluginClass") alloc ] init] which does not seem to work in 0.11.1 My plugin loader : - (void)start { static int installed = 0; if (! installed) { if (RBBundleInit("PluginController.rb", [self class], nil)) NSLog(@"start : failed"); else [[NSClassFromString([self controllerClassName]) alloc] init]; installed = 1; endif } } Can anyone help ? How can I address a Ruby class from ObjC ? Rup |