• 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: Forcing NSController to commit edits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing NSController to commit edits


  • Subject: Re: Forcing NSController to commit edits
  • From: Ali <email@hidden>
  • Date: Wed, 10 Mar 2004 16:50:43 -0500

Thanks Malcolm, that did the trick.

Ali

On 10-Mar-04, at 3:35 PM, mmalcolm crawford wrote:

On Mar 10, 2004, at 12:05 PM, Ali wrote:

I've got a problem where if an edit is in progress(i.e. the cursor is in a textView or textField) and i close the window the edit is not propagated, it is ignored(until the user pressed enter or tabs out). So i'd like to be able to force the controller to take all pending edits. For example, hitting a Done button on a sheet when the user has just entered info into a text field but hasn't hit enter or tab yet, the new data would be lost. Anyone have any ideas? Thanks,

Try sending your controller 'commitEditing'

See:
<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Protocols/NSEditor.html>
"The NSEditor informal protocol is implemented by controllers and user interface elements. It provides a means for requesting that the receiver commit or discard any pending edits."

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.





Ali Lalani
e-mail: email@hidden
--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Forcing NSController to commit edits (From: Ali <email@hidden>)
 >Re: Forcing NSController to commit edits (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: resizing a window before displaying
  • Next by Date: obj-c functions versus class methods
  • Previous by thread: Re: Forcing NSController to commit edits
  • Next by thread: Re: Forcing NSController to commit edits
  • Index(es):
    • Date
    • Thread