Re: saveDocument newbie question
Re: saveDocument newbie question
- Subject: Re: saveDocument newbie question
- From: Neto <email@hidden>
- Date: Tue, 20 Jun 2006 01:39:33 -0300
Alan and all,
Everything works almost as expected. But for some reason I still
can't get the "isEqualToArray" aware of the changes of the contents
of the array when I edit it.
It triggers only if I add or remove itens, but not if I edit them.
I'm editing the array in an NSDrawer with NSTextField binded for each
key. If I add or remove itens, I get uneditedArray different from
editedArray. But if I just edit an existing item, both arrays remains
the same...
Anyone has an idea?
- (void)awakeFromNib
{
uneditedArray = [[NSArray alloc] initWithArray: editedArray];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(checkArray:)
name: NSTableViewSelectionDidChangeNotification
object: nil];
}
- (void)checkArray:(id)sender
{
if (! [uneditedArray isEqualToArray: editedArray])
{
[self updateChangeCount: NSChangeDone];
[uneditedArray release];
uneditedArray = [[NSArray alloc] initWithArray: editedArray];
}
}
_______________________________________________
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