On Sep 22, 2008, at 23:44 , D.K. Johnston wrote:

Thanks for the explanations: it does make some kind of sense now.

The reason I was looking at both forms is that I want the myInt property to be read-only, but I want the MyObject instance to be able to set it. If I do this:

        @property(readonly) NSInteger myInt;

I can't do this in MyObject:

        self.myInt = 123;

without generating a compiler error. And as you've all explained, I can't do this either:

        myInt = 123;

because the textfield value won't be changed. Is Jason's suggestion the best way to get around this problem?

Yes, in this case you would want to do the manual KVO as I demonstrated earlier. If you just surround your ivar update with those messages, your bindings and such will behave as expected.

Jason

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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]

Reply via email to