NSString constant and how to export them
NSString constant and how to export them
- Subject: NSString constant and how to export them
- From: Romain Brestac <email@hidden>
- Date: Fri, 1 Sep 2006 21:29:46 +0200
Hello list,
I have a framework where I define some NSString constants. When a
class imports my framework's header, I would like this class to be
able to use these constants.
What I did: I declare my constants directly in the header because they
are specific to the class: NSString *const MYCONSTANTSTRING;
Now, I need to set a value for MYCONSTANTSTRING and reuse it both in
the framework class AND in the app that link against this framework.
So the question is : where do I set the value ?
- When I set it in the framework' s principal class header (not the
interface), the compiler says something like : ' ... redefinition of
MYCONSTANTSTRING'. Note that I export the header into my application
controller.
- If I set the value in the interface or the implementation, I can't
use it outside of the this instance.
What I want to do is basically the same thing any Apple Framework do
when it defines a constant string.
Thanks. Romain.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden