Re: Filtering breaks bindings-enabled app
Re: Filtering breaks bindings-enabled app
- Subject: Re: Filtering breaks bindings-enabled app
- From: Dan Stein <email@hidden>
- Date: Tue, 25 Jan 2005 10:07:01 -0800
On Jan 24, 2005, at 9:34 PM, mmalcolm crawford wrote:
On Jan 24, 2005, at 8:13 PM, Dan Stein wrote:
FIRST QUESTIONABLE DESIGN DECISION: To support the undo manager and
pasteboard, the document class also declares a separate array that
gets bound to the array controller's content array by setting that in
the controller's bindings pane in IB. I have read the documentation
to indicate that this array should change in lock step with insert:
and remove: messages to the array contrroller.
I'm not sure I follow: Do you mean that you have two arrays containing
your model objects (i.e. your document class has an array that shadows
that in the second model object)? If I haven't misunderstood, then
you should not be doing this and it may well lead to errors. Please
let know which documentation suggests this pattern.
mmalc
Hmm, now I recant my admission that it was in and of itself a bad idea.
The array in my document class does NOT in fact
shadow the one in the second model object, which after all, is only
updated when the user saves data. The array in my
document class is bound to the array controller in exactly the same way
that posted examples have done, in particular,
those of mmalcolm crawford.
Furthermore, the application did not break until I added the SECOND
kind of filtering described in my original post.
There is something I am doing with that business that is not right, and
I may have to post some code to find out what.
I have looked at the code for so many days that I can no longer see it
clearly.
Or else it is a deficiency in the technique used to force new objects
into a filtered array, but I will only conclude
that as a last resort.
Dan
_______________________________________________
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