Re: Strategies to prevent class name clashes
Re: Strategies to prevent class name clashes
- Subject: Re: Strategies to prevent class name clashes
- From: Lieven Dekeyser <email@hidden>
- Date: Fri, 15 Feb 2008 10:42:09 +0100
On 15 Feb 2008, at 10:09, Arne Scheffler wrote:
Hi,
I'm just porting an open source UI toolkit to Cocoa. This toolkit is
mainly used in plug-ins by many different people. So it's more than
likely that two or more plug-ins get loaded into the same process.
It's also very common that the people who uses the toolkit modify
the source. This all worked in C++ because all bundles were loaded
into different name spaces. With Objective-C this is no longer the
case. I already got a problem while porting that two plug-ins that
uses the toolkit were compiled at different times with different
code. But as a nature of Objective-C it only loaded the classes
once. I'm looking now for a way to prevent this. Does anyone have
any idea how to best deal with this ?
Use class name prefixes as a simple namespace substitute. That's why
Cocoa class names are prefixed with NS ( see "Prefixes" in http://www.stepwise.com/Articles/Technical/2002-10-13.01.html
).
--Lieven
_______________________________________________
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