Cocoa/Objective-C flat name space problems
Cocoa/Objective-C flat name space problems
- Subject: Cocoa/Objective-C flat name space problems
- From: Stephen Blinkhorn <email@hidden>
- Date: Thu, 6 May 2010 16:22:14 -0600
Hi all,
I write audio unit plugins and Cocoa's flat name space is causing some
real problems. Essentially I have a static library of Cocoa user
interface classes that I use in multiple plug-in projects. These plug-
ins are often run side by side by the user so I can't guarantee that a
previous version of a class (in an older plugin) hasn't already been
loaded by the run time system.
I know of the following two solutions to this problem but neither are
ideal:
1. Create a framework. This is quite a heavy weight solution and
requires that all classes are backwards compatible.
2. Use the preprocessor the #define unique class names when the
project is compiled. This is great but falls down because the
original class names are still present in the nib/xib files.
Anyone have any other suggestions or tips for dealing with this
situation? With the move towards Cocoa well under way this is
starting to affect a lot of people.
Thanks,
Stephen
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden