link between classes using a class variable
link between classes using a class variable
- Subject: link between classes using a class variable
- From: Raff <email@hidden>
- Date: Wed, 5 Feb 2003 13:36:32 +0100
Hi,
This may be a silly question, but I didn't find anything about this.
I have two classes, CTBar and CTSave.
The first one is a controller/model class (datasource);
The second is the window and application delegate used to load data
(+initialize) or save data (-windowShouldClose), and set preferences.
To access the CTBar data (for (un)archiving), I have a CTSave static
class variable named 'barPointer' (class var because +initialize).
To establish the link with my CTBar instance, I declared barPointer as
an outlet, and linked it to CTBar in Interface Builder.
But the link is not established (in +initialize and -windowShouldClose,
barPointer is equal to (nil)).
Is it bound to the nature of barPointer ?
What should I do ?
Is there a better way to do what I want ?
As I would like to have more model classes linked to CTSave AND to the
view, it seems difficult (or complicated) to rely on a notification
mechanism.
Thanks in advance
R.D.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.