• 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
mark added object in NSArrayController as "dirty"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mark added object in NSArrayController as "dirty"?


  • Subject: mark added object in NSArrayController as "dirty"?
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 27 Aug 2008 17:46:23 -0700
  • Thread-topic: mark added object in NSArrayController as "dirty"?

I've got a simple detail view backed by an NSArrayController. The view views
the NSArrayController's selection. The NSArrayController manages an array of
dictionaries, all very simple.

I've implemented validateValue:... and it's being called when I want it to
be (thanks to "validates immediately"), except on this one occasion:

The user can create a new object - the button calls add:, and I've
overridden newObject:. However, this new object is deliberately invalid;
some fields are blank, but the user must fill them in before leaving and
moving to another selection. That's the intention, anyway. The problem is
that that is not happening; the user can press the selectPrevious: button
without doing any editing, and no validation takes place. Obviously that's
because the user didn't do any editing!

How can I fool the system into thinking the user has done some editing in
every field, so that when the user leaves this selection for another, every
field will be validated? m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, http://tinyurl.com/2ouo3b
Take Control of Customizing Leopard, http://tinyurl.com/2t9629
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: mark added object in NSArrayController as "dirty"?
      • From: Keary Suska <email@hidden>
  • Prev by Date: NSFileManager Help
  • Next by Date: Re: NSFileManager Help
  • Previous by thread: Re: NSFileManager Help
  • Next by thread: Re: mark added object in NSArrayController as "dirty"?
  • Index(es):
    • Date
    • Thread