• synchronize user defaults after having asked controllers to commitEditing — 
that way, if a UI element is bound to the user defaults, its value will be 
obtainable from outside TextMate (e.g. via the defaults shell command) 
immediately after the window has closed (rather than after next “flush”)

It actually puzzles me that this works for text fields (which are not set to 
update the model on each key stroke) which are bound to the shared user 
defaults controller, since we do not explicitly ask this controller to commit — 
I tested it and it works. My guess is that the shared user defaults controller 
adds itself as an observer of NSWindowWillCloseNotification when it receives a 
objectDidBeginEditing: message (getting the window from the received editor, 
just, the editor is of type id, not NSView)

Changed:
U   trunk/PlugIns/Dialog.tmplugin/Contents/MacOS/Dialog
U   trunk/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog
U   trunk/Tools/Dialog PlugIn/Dialog.mm

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to