On Nov 8, 2009, at 5:47 AM, Shai Shasag wrote:

> How could this be? I think the problem is that both bundle_A & bundle_B have 
> principle class with the same name. Somehow Cocoa gets confused.

No "somehow" about it.  Objective-C does not support namespaces;  all classes 
(and selectors) exist within the same namespace.

If you were to look at the console log, you'd probably see a very specific 
message indicating where the two identically named classes came from.

> Why would two different bundles have principle classes with the same name you 
> might ask?
> Well actually there are more than a hundred such bundles in my project. Each 
> bundle is a plugin that follows the same API. If I was to write a different 
> principle class for each it would be a nightmare to maintain.
> 
> Is there a way to tell Cocoa to use the class from each bundle regardless 
> that they both have the same name?

Yes -- name the classes differently.   Some folks use a #define to vary the 
class name per bundle.

And please file a bug via http://bugreport.apple.com/ asking for a solution to 
this particular issue.  You could copy and paste your original message into the 
bug report, if you want.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to