• 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: Cocoa Bindings & GUI question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Bindings & GUI question


  • Subject: Re: Cocoa Bindings & GUI question
  • From: Nicolas Berloquin <email@hidden>
  • Date: Thu, 19 May 2005 13:22:26 +0200

Actually, I went and did the test, and there is something that bothers me.
Let's say I have the same textfield as before, that binds to a default value via a NSUderDefaultControler.
The defaults are registered (also as initial values), and the right value is shown in my window.

But, when I select the content of the NSTextFieldView and erase it (hit backspace), the field remains
empty (the NSTextFieldView), but on the model side, the right (registered default) value is set, but
the textfield never shows that visually. 
I had to resort to setting a Null Placeholder in the bindings, but it doesn't feel right
to me. 
It breaks the automatism behind NSUserDefaults and its controler.
For example, when I want to modify the defaults for this value (between released versions
for example), I also need to edit the null placeholder in IB.
I feel it should always fallback to the defaults or the initial value instead of setting the
value to nil...

Should I consider this as a cocoa bug and file it ?

(All this is inside my prefs window. Closing then re-opening the window doesn't update the
value...)

thanks
On May 18, 2005, at 4:02 PM, Scott Anguish wrote:

it depends on your application, but just relying on the registered defaults should be fine


On May 18, 2005, at 5:25 AM, Nicolas Berloquin wrote:

I have a related question about bindings and user defaults.
I use bindings for my prefs window that bind to NSUserDefaults
that are registered in my NSApplication (with registerDefaults: ).
For example, let's say that one of the values is a number that is
shown in an editable NSTextField.
My question is :
In IB, in the bindings pane, should I set a value for 'Null Placeholder',
and should I enter a value in the control also ? Or should I completely
rely on the registered defaults ?


 _______________________________________________
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: 
 >Cocoa Bindings & GUI question (From: Jesus De Meyer <email@hidden>)
 >Re: Cocoa Bindings & GUI question (From: Ricky Sharp <email@hidden>)
 >Re: Cocoa Bindings & GUI question (From: Jesus De Meyer <email@hidden>)
 >Re: Cocoa Bindings & GUI question (From: Scott Anguish <email@hidden>)
 >Re: Cocoa Bindings & GUI question (From: Nicolas Berloquin <email@hidden>)
 >Re: Cocoa Bindings & GUI question (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: Cocoa view design considerations
  • Next by Date: iDisk and Xcode
  • Previous by thread: Re: Cocoa Bindings & GUI question
  • Next by thread: Re: Cocoa Bindings & GUI question
  • Index(es):
    • Date
    • Thread