Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: NavCreateAskSaveChangesDialog deactivation problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NavCreateAskSaveChangesDialog deactivation problem



On Tuesday, Dec 3, 2002, at 10:01 Australia/Sydney, Glenn L. Austin wrote:

The problem is that if you click "Don't Save" and then attempt to
programmatically close your window, the window goes away. However, if you
press "D", you have to close the window twice, as the window does *NOT* go
away when you close it the first time.

This only seems to happen when you press "D" for "Don't Save."

Maybe my calling sequence differs from yours, but I simply don't see this happen. If I click Dont save or if I hit D, my window closes. It has to, because my code does not distinguish the cause of the result from ask save changes (click or type), it only acts on the result, <kNavUserActionDontSaveChanges>.

My calling sequence is a bit convoluted to post here, because it's wrapped up in a number of interacting objects, but essentially it comes down to:

user clicks close button, or app programmatically asks window to close - these both end up in the window object's close method:

Close:
if ( window is dirty )
result = ( ask save changes )
else
result = just_close_anyway

if ( result == just_close_anyway )
ActuallyClose

And of course ActuallyClose disposes the window, etc. If the window is not active when ask save changes returns having typed 'D', so what? It still closes. I'm sure I'm misunderstanding the description of the bug!

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

References: 
 >Re: NavCreateAskSaveChangesDialog deactivation problem (From: "Glenn L. Austin" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.