Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to "flash" the default OK button in a dialog?



hi Eric,

hmm...interestingly enough, it doesn't.

so on a hunch, i decided to try adding another line into my ModalFilterUPP, so that now it looks like this:

pascal Boolean myModalFilterProc( DialogRef theDialog, EventRecord *theEvent, SInt16 *itemHit )
{
SetDialogDefaultItem( theDialog, GetDialogDefaultItem( theDialog ) );
return( StdFilterProc( theDialog, theEvent, itemHit ) );
}

...and now, everything is working properly. so i guess that the first reply *was* correct (sorry Peter), only it appears that inside of the ModalFilterUPP i have to *always* call SetDialogDefaultItem(), even though it was set initially back when the dialog was created.

...so SetDialogDefaultItem() must be doing something other than just assigning the given default item value, eh?

...thanks to all who replied! -phil.

On Wednesday, February 27, 2002, at 11:49 PM, Eric Schlegel wrote:

On Wednesday, February 27, 2002, at 08:41 PM, Phillip A. Kavan wrote:

...now when i do it that way, my default buttons (DITL #1) are not flashing in OS X. IF i replace 'myFilterUPP' with 'NULL' in the call to ModalDialog(), then the default button DOES flash.

Does ModalDialog still return "ok" when you press Return, even if the OK button doesn't flash? Or is the Return key ignored entirely?

-eric
_______________________________________________
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.


---
Phillip A. Kavan <mailto:email@hidden>
_______________________________________________
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: how to "flash" the default OK button in a dialog? (From: Eric Schlegel <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.