• 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
[Binding] NSObjectController content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Binding] NSObjectController content


  • Subject: [Binding] NSObjectController content
  • From: Administrateur internet lutin Ludique <email@hidden>
  • Date: Fri, 11 Nov 2005 11:25:06 +0100

Hi,

I've got a problem.

For the first time, my customWindowController will not be in charge of loading and saving the data. There will be a true "dataObject" beneath. I'm trying to become a "real" programmer and comply with the MDC paradigm.

So I've got a nib file (theNib).
Two classes:
   - the NSWindowController subclass: wdwCtrlr
   - the "data" class (subclass of NSObject: dataClass)
       in charge of loading, managing, saving the datas.

A wdwCtrlr instance is created by MainMenu.
It is intialized by [super initWithWindowNibName: @"theNib"]
So the nib is waked with wdwCtrlr as owner.
In the nib, there is the window, a NSObjectController instance([C]) and an instance of the dataClass ([M]). The content outlet of the objectController instance ([C]) is set to the dataClass instance ([M]). The file owner (a wdwCtrlr class) has an outlet set to the dataClass instance ([M]). let's call this outlet [a].
A textField in the window has it's binding value set to the NSObjectController instance ([C]) with a key corresponding to one of the dataClass parameters.


When the wdwCtrlr instance is intitialized, it is passed a handle on a dataClass instance which it retains.
It sets the dataClass instance from the nib ([M]) to this dataClass instance passed by the creator via the outlet [a].


When the wdwCtrlr instance calls for the parameter of the dataClass instance ([M]) parameters (the same as the one called by the textField) and NSLogs it, its works perfectly.
But the textField never shows the parameter.


Does anybody where the problem could lie ?

Many thanks.

_______________________________________________
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


  • Prev by Date: [NSArrayController] finding object
  • Next by Date: Re: User Defaults
  • Previous by thread: Re: [NSArrayController] finding object
  • Next by thread: Closing alert sheet
  • Index(es):
    • Date
    • Thread