Re: Filtering breaks bindings-enabled app
Re: Filtering breaks bindings-enabled app
- Subject: Re: Filtering breaks bindings-enabled app
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 24 Jan 2005 21:20:15 -0800
On Jan 24, 2005, at 8:13 PM, Dan Stein wrote:
SECOND QUESTIONABLE DESIGN DECISION: I implemented a second type of
filtering by creating a support table in the main document view that
contains a list of all the unique strings in one of the table columns.
When an item is selected from this table, the main table is filtered
to display only those rows containing the selected string in the
column of interest. This feature supports selecting multiple strings
in the support table for aggregating rows. It also works seamlessly
(for filtering, at least) with the search field in the toolbar. Looks
good, but something is broken deep inside my app, because when this
filter is active I can no longer force new rows into the table as I
can with the search field, even though the logic that performs the
filtering in the array controller's arrangeObjects: method is pretty
much the same as for the search field, except that an enumerator is
required to examine ( for all the rows in the main table; nested: for
all selected rows in the support table: see if the string from that
table matches the one in the appropriate field in the main table.)
If I don't force new entries into the filtered table, I get messages
that new entries could not be inserted at the index after the last
displayed item. If I do force the entries, I get two instances of the
new row, which I can delete, but if I do not, the program crashes on
exit with a SIGBUS.
Are you able to show code for this? In the "Filtering Controller"
example the first check it to determine whether or not an object is
newly inserted. If it is, it's added immediately to matchedObjects.
mmalc
_______________________________________________
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