Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > OOP Powerplant for Mac > Menus update in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 444 of 482
Post > Topic >>

Menus update in LApplication

by jolielara@[EMAIL PROTECTED] Mar 8, 2006 at 05:14 AM

Hi,

I encounter trouble to update menus in my LApplication-derived app for
LSingleDoc-derived windows.
Each time I display a dialog box using this king of code:

void AnyFunc()
{
	StDialogHandler	theHandler(PPob_MyID, this);
	LWindow* theDialog = theHandler.GetDialog();
	theDialog->Show();
	while (true) {
		MessageT hitMessage = theHandler.DoDialog();
		if (hitMessage == msg_Cancel) {
                        break;
		} else if (hitMessage == msg_OK) {
			// Do something
			break;
		}
	}
}

when exiting this dialog using cancel or OK my app's menus are not
updated correctly, even by calling
LCommander::SetUpdateCommandStatus(true) plus
LEventDispatcher::UpdateMenus()...

The latter one ends up by calling MyApp::FindCommandStatus instead of
the topmost LSingleDoc-derived window's FindCommandStatus (that could
correctly update the menus).
Therefore if my doc contains an edit field the Edit menu is not
enabled...

The only way to update the menus is to switch to another app (using
cmd+tab or by clicking in another app's window) and switch back to my
app!

Does anyone know a trick to enforce correct menus updating?

Thanks in advance for your help...
Regards,
Mac****ter.
 




 5 Posts in Topic:
Menus update in LApplication
jolielara@[EMAIL PROTECTE  2006-03-08 05:14:05 
Re: Menus update in LApplication
michfiel@[EMAIL PROTECTED  2006-03-08 14:34:45 
Re: Menus update in LApplication
jolielara@[EMAIL PROTECTE  2006-03-08 05:47:23 
Re: Menus update in LApplication
David Phillip Oster <o  2006-03-08 14:31:44 
Re: Menus update in LApplication
jolielara@[EMAIL PROTECTE  2006-03-10 01:48:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 0:47:28 CDT 2008.