• 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: Setting up a UI where changes are only applied when OK clicked?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting up a UI where changes are only applied when OK clicked?


  • Subject: Re: Setting up a UI where changes are only applied when OK clicked?
  • From: "R. Matthew Emerson" <email@hidden>
  • Date: Wed, 11 Jul 2007 16:41:16 -0400


On Jul 11, 2007, at 4:00 PM, Sean McBride wrote:

I want to have a UI where I allow objects to be edited, but I don't want
those changes actually applied until an 'OK' button is pressed. (For
example, iTunes' 'Get Info' window shows the current values, lets the
user change them around, but doesn't change the document until OK is
pressed.) This conflicts with the 'live' nature of bindings.


I seem to remember something about making a duplicate moc that is
swapped/merged with the original when the OK button is pressed, but I
just can't find it in the archives/docs...

You could use a separate managed object context, copy the objects into it, and let the user edit them there. (Your user interface objects would be bound to controllers that used this separate moc, of course.)


When the user presses the OK button, you'd copy the objects back into the main moc.

I will RTFM if someone could kindly point me there. :)

You might be looking for
http://developer.apple.com/documentation/Cocoa/Conceptual/ NSPersistentDocumentTutorial/index.html
and
http://developer.apple.com/samplecode/DepartmentAndEmployees/index.html


(Look at the "A sheet for creating a new employee" section.)

_______________________________________________

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


References: 
 >Setting up a UI where changes are only applied when OK clicked? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Formatting number for leading zeros
  • Next by Date: [SOLVED] Is there a fast NSShadow alternative?
  • Previous by thread: Re: Setting up a UI where changes are only applied when OK clicked?
  • Next by thread: Re: Setting up a UI where changes are only applied when OK clicked?
  • Index(es):
    • Date
    • Thread