• 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
Something strange with NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Something strange with NSArrayController


  • Subject: Something strange with NSArrayController
  • From: email@hidden
  • Date: Sun, 18 Dec 2005 19:53:30 -0800

Something strange is happening with my coredata app, and it has to do with NSArrayController and some objects bound to it.

I have an NSPersistentDocument app, and an NSArrayController that is subclassed to return a special NSPredicate to sort another NSArray.
Now, My NSDocument subclass has a reference to said NSArrayController (lets call it peopleController) set in IB.
From the NSDocument I set two keys for strings to peopleController so it can create a correct NSPredicate other objects will use.
Bound to peopleController I have a NSTableView, all bound in IB. My controller is supposed to re-process the NSPredicate if the
selection changes (by the table view). The totaly strange thing is that the peopleController that is linked to the NSDocument subclass,
and the on bound to the NSTableView are NOT THE SAME CONTROLLER!!

This means that somewhere my class of controller is being re- created?? Also, setSelectedObjects is not being called by the tableview, but
setContent............... I cant create the NSPredicate I need based in selection because the NSTableView is not changing my selection!

Whats going on? Does coredata do tricks behind my back? I cant rely on the object being bound to and the one set in IB to be the same?

NSPersistentDocument ------>peopleArrayController
|
|
NSTableView ----B-I-N-D-I-N-G---------NOT THE SAME?? (I've checked by pointer and they are not the same object)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Something strange with NSArrayController
      • From: email@hidden
  • Prev by Date: NSXMLDocument and Relax NG
  • Next by Date: How to determine shared libraries?
  • Previous by thread: NSXMLDocument and Relax NG
  • Next by thread: Re: Something strange with NSArrayController
  • Index(es):
    • Date
    • Thread