Re: Shared User Defaults Binding and NSTextField.setStringValue(...)
Re: Shared User Defaults Binding and NSTextField.setStringValue(...)
- Subject: Re: Shared User Defaults Binding and NSTextField.setStringValue(...)
- From: Rémy Schumm <email@hidden>
- Date: Thu, 24 Mar 2005 08:56:22 +0100
wow, that work. thank you so much. problem solved in 5min :-)
I set the value in Java with
NSUserDefaults.standardUserDefaults().setObjectForKey(aString, aKey);
and get the Values with
NSUserDefaults.standardUserDefaults().stringForKey(aKey);
cool :-)
Rémy
Am 24.03.2005 um 08:37 schrieb Jiva DeVoe:
Probably call "[self willChangeValueForKey:...]/[self
didChangeValueForKey:...] and friends...
I would ask why you want to set it via the setStringValue method... I
think if you just change the value programatically in your
NSUserDefaults object, you'll find it will update your GUI widget
appropriately.
In other words, change the value directly in preferences and let
bindings get the value automatically and put it in the GUI. The
opposite of what you are doing now.
On Mar 22, 2005, at 6:33 AM, Rémy Schumm wrote:
Hello List
I have a NSTextField which value is bound to the Shared User Defaults.
- If I update the NSTextField in the GUI, it's value is sucessfully
stored in the Preferences.
- If I update the NSTextField programmatically by
((NSTextField)ziel).setStringValue(aString);
the value is NOT stored in the Preferences.
Question: what have I to do to manually notify the "bindings" that
the NSTextField's value has changed?
thank you very much
Rémy
--
Zürcher Hochschule Winterthur - ZHW
(Zurich University of Applied Science Winterthur, Switzerland)
Rémy Schumm, ZHW - T, E222, Postfach 805, 8401 Winterthur
dipl. Ing. FH, Assistent Softwareentwicklung, Dept. T,
tel. direkt +41 52 2677 490 gsm/mms/sms +41 79 21 1234 1
http://www.zhwin.ch/~smr - PGP ID 0x59BA4E81 - Mac OS X Panther on G5
Content Security by MailMarshal
_______________________________________________
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