Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData transient attribute binding writes but doesn't read



The problem turned out to be that setKeys:triggerChangeNotificationsForDependentKey: was not actually causing my derived variable changes to be broadcast. I can't figure out why, since the exact same mechanism works in other parts of my code.

The fix was to observe the independent attributes and call the will/ didChange methods for the dependent key when the independent attributes change.

I'd still like to know why setKeys:triggerChangeNotificationsForDependentKey: doesn't work, though. I am on OS 10.4.11.

Dave

On Nov 18, 2007, at 7:43 PM, Dave Fernandes wrote:

- I have an NSTextField bound to an NSObjectController's selection.myValue
- The NSObjectController is set up to use my derived NSManagedObject class.
- The myValue attribute of my entity is transient


When I type into the NSTextField, my managed object's setMyValue method gets called, as it should.

However, the myValue method doesn't get called. I thought the way MVC-bindings worked was that there was supposed to be a round-trip -- call the setter, then the getter.

The only time the myValue method is called is when I am loading the window.

Is there any way to trouble-shoot this?

Dave
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/dave.fernandes% 40utoronto.ca


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >CoreData transient attribute binding writes but doesn't read (From: Dave Fernandes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.