FoxInCloud
Problems with adapted menu
Gravatar is a globally recognized avatar based on your email address. Problems with adapted menu
  Paul
  All
  Jan 6, 2019 @ 09:01pm

Hi,

I have this code :

set sysmenu on
do QuickQt.mpr

The adapted menu code (lots of calls to wmenu()) runs successfully after I log in using my login form, but the menu never appears in the browser.

Here is the browser page after the code is run, I'm assuming I should see a menu at the top. (I haven't worked out how to make the login form go away yet, thisform.hide doesn't hide it).

What am I doing wrong?

Also, a weird thing I have found is that if I step into the .mpr code and step over the hundreds of wmenu() calls then the menu code runs as quickly as I can step over them (around 20 seconds), but if I just let the code run without stepping into the .mpr then it sometimes takes 3 minutes to execute!!! What could be the reason for this?

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Problems with adapted menu
  Gilles Lajot-Sarthou
  Paul
  Jan 6, 2019 @ 10:39pm

Hi Paul,

Can you try to execute first the form, before calling the menu, and just before the form.release() call the menu..

* Login and mp are well, Put My new user			
=thisForm.wUserLogIn(m.THISFORM.UserClepk)
* Call the menu
DO MyMenu.mpr
* Close the login form
=THISFORM.RELEASE()

Regards Gilles

Gravatar is a globally recognized avatar based on your email address. re: Problems with adapted menu
  Paul
  Gilles Lajot-Sarthou
  Jan 7, 2019 @ 04:57pm

Hi,

The problem was that I needed to execute these lines prior to calling the menu :

wMenu('SET SYSMENU TO')
wMenu('SET SYSMENU AUTOMATIC')

Paul

Gravatar is a globally recognized avatar based on your email address. re: Problems with adapted menu
  FoxInCloud Support - Thierry N.
  Paul
  Jan 8, 2019 @ 03:04am

Hi Paul,

awGenMenu.prg adds this instruction at the beginning of the generated .mpr so you can just call do myMenu.mpr like in your desktop application.

Whenever in doubt, I recommend you take a look at tuto*.prg, eg. in this case tutoSets.prg

Gravatar is a globally recognized avatar based on your email address. re: Problems with adapted menu
  Paul
  FoxInCloud Support - Thierry N.
  Jan 8, 2019 @ 12:30pm

Yeah, I have seen this code added in the sample .mrp, but this was not done in my adapted .mpr.
Perhaps because I have Setup and Cleanup code in the menu?

Paul

Gravatar is a globally recognized avatar based on your email address. re: Problems with adapted menu
  FoxInCloud Support - Thierry N.
  Paul
  Jan 8, 2019 @ 01:35pm

awGenMenu.prg is just an adapted copy of GenMenu.prg, it behaves the same.

© 1996-2019