Hi all,
I've created a "Debug" class in my app, which contains an instance variable and
several methods. I want to add this to my application but can't see how.
I can add it to MyDocument class like this:
- (id)init
{
self = [super init];
if (self) {
// other stuff
debug = [Debug new];
}
return self;
}
- (void) dealloc
{
// other stuff
[debug release];
[super dealloc];
}
But I want a global instance for the application as a whole. How do I do this?
Do I have to subclass NSApplication just to create a global variable?
I want to be able to call it from any class in my app, such as:
[[NSApp debug] myMethod];
Please reply to the list.
Thanks,
Tom
BareFeet
--
Comparison of SQLite GUI tools:
http://www.tandb.com.au/sqlite/compare/?ml
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]