Re: Removing objects from the array controller but not from the persistent store (Newbie)
Re: Removing objects from the array controller but not from the persistent store (Newbie)
- Subject: Re: Removing objects from the array controller but not from the persistent store (Newbie)
- From: Sebastian Morsch <email@hidden>
- Date: Wed, 2 Nov 2005 00:20:50 +0100
Thanks Marcus!
My mistake was to think of arrangedObjects as the point to manually
modify the shown objects (wich only seems to work when subclassing
arrangeObjects). Of course, filterPredicate is the most straight
forward way to influence the displayed objects.
Cheers, Sebastian
The easiest way is to simply apply a NSPredicate against the
array. Depending on how you are accessing the NSArrayController
you can set this in Interface Builder or in the code.
Marcus
On Oct 27, 2005, at 2:27 AM, Sebastian Morsch wrote:
Hi!
I have a little core data question:
I'm stuck with the task to implement a Filemaker-style behaviour
where a database record can be 'omitted' (made invisible) from the
list of shown records. My approach was to try to modify the
arrangedObjects that are shown in the table in a NSTableView
<bound to> NSArrayController <bound to> NSArrangedObjectContext
setup, but it doesn't seem to work that way.
It's obvious how to permanently remove objects from the array
controller AND the persistent store, but how can I just 'hide'
them? Furthermore, I'd like to be able to show all the 'hidden'
objects, i.e. the complement of the currently shown objects, but I
have no idea how to achieve this either...
I know it's always a bit silly to think in some other design's
ways when developing and I assume, that's where my problem lies.
I'd appreciate any help or pointing-me-somewhere very much! Thanks.
Sebastian
_______________________________________________
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