Binding preferences for content of text field

Hi All,

This is a question for all (but probably directed more to Bruce Philips and his “Binding preferences…”) stickies in this forum.

I have tried the tutorial on Cocoa Binding Prefs and completed the demo project on binding color wells and all that. No problem.

Lately, I tried to do this with the content of text field in the preference pane (accessible via the Menu Item in my project). I was thinking that by doing this, the user prefs for that text field could be changed on-the-fly and persist to next launch. This is in the manner that the color well prefs could be changed in the demo project of the tutorial.,wiht hardly any coding needed.

But, that wouldn’t work. Is there anything else that I must do to get the binding work? I checked Shared Defaults, gave the name of the value (equal to the content of the text field in the default) and then clicked “Bind”. The icon for binding is in the main.nib so I know that the binding is active. It’s just that I do not see the desired effect like I do when I change the color in the color well or the font size in the slider of the demo project of the binding tutorial.

What gives? Is there something else that must be done to make binding work with text fields? BTW, I also tried to add the “on will finish launching” handler that was mentioned in your stickies but I did not go further (farther?) than simply testing the content of the text field. No change there either, no matter how I change the content in the Pref pane.


archseed :expressionless:

Offhand, I would suggest trying the “Continuously Updates Value” checkbox when binding the value of a text field.

I’ll just quote this page for now:

Wow Bruce, thanks for the quick feedback. Do you sleep at all? :lol:

I will try your suggestion and will feed the results back for info.

Thanks a bundle.

archseed :slight_smile: