• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
link between classes using a class variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: link between classes using a class variable
      • From: Raff <email@hidden>
  • Prev by Date: Text file types
  • Next by Date: Re: Document-based apps interacting with main menu
  • Previous by thread: Re: Text file types
  • Next by thread: Re: link between classes using a class variable
  • Index(es):
    • Date
    • Thread