• 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
Re: How to get initial values into dialog via bindings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get initial values into dialog via bindings?


  • Subject: Re: How to get initial values into dialog via bindings?
  • From: Guy Umbright <email@hidden>
  • Date: Sat, 14 Jan 2006 17:39:00 -0600

The object I am attempting to 'edit' via the dialog has default values applied in the constructor,
the fields in the dialog have (different) initial values specified via IB.


I do not set the object's values in the awakeFromNib (which I assume would cause the
values to show up). The idea is that I pass the object to be editted into the constructor of
the controller (it may be new or existing) and the dialog operates on the said object.


Guy


On Jan 14, 2006, at 5:14 PM, Shawn Erickson wrote:


On Jan 14, 2006, at 3:09 PM, Guy Umbright wrote:

I am trying to set up a dialog with bindings. I have the NSObjectController and the dialog
controls all wired up. When I edit the values in the dialog, they show up modified in the
"target" object,so that is all working properly.


What doesn't work is that the initial values are not mapped into the controls, I just get
empty text fields (even if default values are specified). The object has the appropriate
accessor methods and at least the setters all work fine. Is there something else I need
to do to get the initial object values into the controls?

"even if default values are specified" how are you doing this?

Have you tried to setup your objects ivars in awakeFromNib using KVO compliant setters?

-Shawn



_______________________________________________ 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
References: 
 >How to get initial values into dialog via bindings? (From: Guy Umbright <email@hidden>)
 >Re: How to get initial values into dialog via bindings? (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: NSTextView keydown alternative?
  • Next by Date: [newbie] Window state saving
  • Previous by thread: Re: How to get initial values into dialog via bindings?
  • Next by thread: Re: How to get initial values into dialog via bindings?
  • Index(es):
    • Date
    • Thread