[Openmcl-devel] What goes on under the hood during revert
ron at flownet.com
Mon Jan 25 18:26:42 UTC 2010
On Jan 25, 2010, at 2:02 AM, Gary Byers wrote:
> On Sun, 24 Jan 2010, Ron Garret wrote:
>> Trying to trace through the process of what happens when you revert a document...
>> The REVERT menu item invokes revertDocumentToSaved: (as can be
>> determined with this handy-dandy little snippet): >
>> ? (%get-cstring (#_sel_getName (menu-item-action-selector "File"
>> "Revert"))) "revertDocumentToSaved:"
>> As far as I can tell, this method is not overridden anywhere in the
>> GUI sources, so this just does the standard Cocoa thing, namely,
>> displays the "Are you sure?" dialog, and then invokes....
>> ... and that's where I get very puzzled, because the latest docs say
>> it invokes revertToContentsOfURL:ofType:error:, which is also, as
>> far as I can tell, not overridden anywhere. What *is* overridden is
>> revertToSavedFromFile:ofType: but that method is deprecated in
>> Leopard, and as far as I can tell (by adding a print statement) this
>> method is in fact not invoked when a file is reverted.
> It is in fact invoked. (I added a (print "Reverting!") call in the method
> body and when I reverted a document in the standalone IDE, that output went
> to the AltConsole window. I don't know why something similar didn't happen
> in your case.)
It's because I'm an idiot. I didn't actually add a print statement, I uncommented the call to NSLog and forgot that those messages end up in the system console, not the AltConsole.
More information about the Openmcl-devel