NSArrayController, saving and reloading sort descriptors
NSArrayController, saving and reloading sort descriptors
- Subject: NSArrayController, saving and reloading sort descriptors
- From: Knud Hinnerk Möller <email@hidden>
- Date: Wed, 14 Mar 2007 14:00:55 +0000
Hi,
can anyone help me with the following problem:
- I have an NSArrayController for a subclass of NSManagedObject
called KNResourceNode
- KNResourceNode has a fake access method "anyLabel" (i.e. not giving
access to any real ivar or attribute)
- in IB I specify the sort descriptor for a table column that is
bound to the controller as such: (key: "anyLabel", selector:
caseInsensitiveCompare, order: ascending) - this works fine
- when the application terminates, I write the controller's sort
descriptors to NSUserDefaults
- I bind the controllers sort descriptors to NSUserDefaults (so that
the sorting is remembered)
Now, this all works fine when I specify a particular contentSet
binding for the controller. When I don't (i.e. I just want all
instances of KNResourceNode), I get the following error on startup
(when then binding is taking place, I suppose) - but only for sort
descriptors that use "anyLabel"! Not for any other keys, which might
be actual attributes of KNResourceNode.
*** NSRunLoop ignoring exception 'Unknown key in query. anyLabel'
that raised during posting of delayed perform with target 376330 and
selector 'invokeWithTarget:'
I hope I explained this well enough. Does anyone know what is going
on here?
Cheers,
Knud
-------------------------------------------------
Knud Möller, MA
+353 - 91 - 495086
Digital Enterprise Research Institute
National University of Ireland, Galway
Institiúid Taighde na Fiontraíochta Digití
Ollscoil na hÉireann, Gaillimh
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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