Re: Something strange with NSArrayController
Re: Something strange with NSArrayController
- Subject: Re: Something strange with NSArrayController
- From: email@hidden
- Date: Sun, 18 Dec 2005 21:00:00 -0800
Well, its seems the main problem has been solved... but still its
interesting why the same object (what should have been) turned out
different...
On 平成 17/12/18, at 19:53, email@hidden wrote:
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
_______________________________________________
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