Re: Is it possible that PreferencePane's share "classes name space"?
Re: Is it possible that PreferencePane's share "classes name space"?
- Subject: Re: Is it possible that PreferencePane's share "classes name space"?
- From: Andrei Tchijov <email@hidden>
- Date: Wed, 6 Sep 2006 09:13:29 -0400
Tom,
Thanks for the link. It is most certainly very illuminating. I
still can not say that I think that it was good idea on Apple part to
do it the way it was done, but at least now I know exactly what is
going on.
Andrei
P.S. While trying to implement idea suggested in the article, I run
into strange problem with preprocessor. I know that I am a little
bit rusty with CPP, but I thought that this should work
#define PRODUCT_PREFIX comFooBar
#define PRODUCT_VERSION 1_0
#define _prefixedVersionedName_( prefix, version, name ) prefix ##
version ## name
#define fooBarClass( className ) _prefixedVersionedName_
( PRODUCT_PREFIX, PRODUCT_VERSION, className )
... latter on ...
#define RealClassName foorBarClass( RealClassName )
and was expecting that RealClassName will be replaced with
comFooBar1_0RealClassName. Instead I was getting
PRODUCT_PREFIXPRODUCT_VERSIONRealClassName. So I end up with
#define fooBarClass( className ) _prefixedVersionedName_( comFooBar,
1_0, className )
instead. Strange.
On Sep 5, 2006, at 8:02 PM, Tom Harrington wrote:
On 9/5/06, Andrei Tchijov <email@hidden> wrote:
I can deal with this particular problem (by using #define
to re-name
all "shared" classes in new version). What bothers me is the fact
that there is no ANY guaranty that I will not come up with class name
which is used/implemented by some other preference pane. Am I missing
something? Is there a way to FORCE preference pane to look only
inside itself when it is trying to resolve classes?
It's not that it's possible for preference panes to share namespace--
it's that it's guaranteed to happen and is in fact documented to work
this way. See the preference pane documentation-- specifically this
section: http://developer.apple.com/documentation/UserExperience/
Conceptual/PreferencePanes/Tasks/Conflicts.html#//apple_ref/doc/uid/
20000706
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden