Your description of the problem is a bit fuzzy. Let me nitpick at your 
description -- it may be that if you straighten out your terminology you'll 
solve your problem:

On Apr 29, 2011, at 12:56, Lorenzo Thurman wrote:

> I have an NSTableView column bound to an NSArrayController which itself
> is bound to an NSMutableArray.

No, it's not bound to a NSMutableArray. It's bound to an array *property* of 
some object. If the array controller is in the XIB file, it's typically bound 
to one of File's Owner's properties.

> The mutable array resides in a different XIB.

Almost certainly not. At least, I hope not. Why would you put a mutable array 
in a XIB? A mutable array is likely used as the backing store of an array 
property of an object in your data model (or possibly of a controller object).

> The data is displayed as expected, but when I remove an item, although it
> does disappear from the table, the
> change is not written to disk when the application quits. I use
> NSKeyedArchiver to persist the array to disk upon quitting. When the
> application quits, the original array including the removed items is
> written to disk.

Which array? We haven't actually located the array yet. You might inadvertently 
have 2 arrays where you only intend there to be one.

> I did some debugging and found that after the items are removed from the
> array controller, the underlying array does indeed reflect the removal,
> but something happens between there and quitting the application that
> brings the removed items back into the array.

Another possibility is that you really did put an array into a XIB, which means 
the *same* array contents will be reloaded from the XIB every time that XIB is 
loaded. Are you sure "the array" isn't being written correctly to your 
persistent store? Perhaps it is, but the written value isn't being reloaded 
next time?

> My application also uses an NSPopupButton to display these same items.

Is this just additional information, or are you saying there's an issue with 
the the popup button too?


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to