Menu

#41 [myPlugin principalClass]=nil if plugin's main class is RB

v0.4.3
closed
nobody
None
5
2007-05-25
2006-10-22
Rup
No

In Objective C :
NSBundle *currPlugin = [NSBundle bundleWithPath:currPath];
Class currPrincipalClass = [currPlugin principalClass];

When I have defined a plugin with a main class which is
a Ruby class, this last call returns nil, even if the
bundle's Info.plist is correct, with principalClass
well defined.

I would expect RubyCocoa to patch, somehow, this
behaviour to at least return an Objective-C class name
for the Ruby class so that the next line works in OC or
RB :

// Instantiate the principal OC or RB class
id currInstance = [[currPrincipalClass alloc] init];

Even better would be for this call to load the Ruby
file if it has not yet been loaded, as is described in
the NSBundle principalClass method for normal OC
behaviour ...

Rup

Discussion

  • Laurent Sansonetti

    Logged In: YES
    user_id=553218
    Originator: NO

    Can you retry with 0.11.0? Some changes have been made in this specific area.
    Please re-open if the problem is still pertinent. Thanks.

     
  • Laurent Sansonetti

    • status: open --> closed
     

Log in to post a comment.