• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData transient attribute binding writes but doesn't read
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: CoreData transient attribute binding writes but doesn't read
  • From: Dave Fernandes <email@hidden>
  • Date: Mon, 19 Nov 2007 21:23:42 -0500

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:
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:
This email sent to email@hidden


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

  • Prev by Date: Re: have Leopard functionality and still run on Tiger
  • Next by Date: Xcode 3, problem creating Core Data UI via drag and drop
  • Previous by thread: CoreData transient attribute binding writes but doesn't read
  • Next by thread: Design Advice Sought for Interesting NSTableView
  • Index(es):
    • Date
    • Thread