when you do self.myInt under the covers you're really doing [ self
setMyInt:123 ], and that method is KVO compliant so it fires the
property change notification the textfield needs.
myInt = 123 just sets the variable directly and skips the property
change notification.
On Sep 23, 2008, at 9:35 AM, D.K. Johnston wrote:
I'm trying to learn how to use bindings. MyObject has an NSInteger
myInt. I used @property and @synthesize to make myInt into a
property. In IB I bound an NSTextField to the myInt property. Now
when I do this:
self.myInt = 123;
when initialising MyObject, the value shows up in the text field.
But if I do this instead:
myInt = 123;
the textfield just shows '0'. What's happening here?
dkj
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
This email sent to [EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]