• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: saveDocument newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: saveDocument newbie question
      • From: "Alan Smith" <email@hidden>
References: 
 >Excluding native file type from saveDocumentTo: accessory view. (From: Joshua Scott Emmons <email@hidden>)
 >saveDocument newbie question (From: Neto <email@hidden>)
 >Re: saveDocument newbie question (From: Andrew Merenbach <email@hidden>)
 >Re: saveDocument newbie question (From: "Alan Smith" <email@hidden>)
 >Re: saveDocument newbie question (From: Neto <email@hidden>)
 >Re: saveDocument newbie question (From: "Alan Smith" <email@hidden>)

  • Prev by Date: NSWorkspace launchApplication fails on some apps
  • Next by Date: Re: Noob question with printf error
  • Previous by thread: Re: saveDocument newbie question
  • Next by thread: Re: saveDocument newbie question
  • Index(es):
    • Date
    • Thread