osx - CoreData ArrayControllers in Cocoa Storyboards -


i developing mac os port of ios app , face problem nsmanagedobjectcontexts when using nsarraycontrollers in storyboard based cocoa app.

it's kind of follow-up question to: storyboard tabviewcontroller in os x application - core data array controllers in each scene?

i have viewcontrollers presented in tabbarcontroller, showing same coredata entities. loaded through nsarraycontrollers, hooked interfacebuilder.

from existing knowledge, no problem data on screens. editing , saving coredata works. realized, every storyboard scene got it's own instance of nsarraycontrollers , each own nsmanagedobjectcontext. when changing , saving data on 1 screen, not updated on other screens, bound through ib bindings , work in other cases. showing data, have loaded , not updating automatically.

i think problem is, changed data contexta not merged (or synced) other contexts of other screens.

what best way of doing that? should use nsmanagedobjectcontextdidsavenotification this?

that mean, have write code, manually start merging changes 1 context other nsmanagedcontexts. smell bad me. think there must easier way, not aware of , unable find out about.

if have hint me, please stick me in right direction. already.

problem solved, did thumb error cocoa bindings: dragged object in storyboard every scene , set appdelegate. instantiated several appdelegates this, bad idea! corrected this, referencing appdelegate through properties on viewcontrollers , works should be. ib has little edges, 1 has totally aware, happening.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -