Welcome! Log In Create A New Profile

Advanced

WB18 MenuAddOption with parameter

Posted by Herro 
Herro
WB18 MenuAddOption with parameter
October 13, 2013 10:35AM
Hallo,

I try to use MenuAddOption to call a procedure like this:
MenuAddOption(OPT_NoName1,"Submenu1","Submenu1",CallProcPage,"page_Productlist" )


Global procedure looks like this:

PROCEDURE CallProcPage (pPagenameToCall)
PageDisplay(pPagenameToCall)

But nothing happens. There are no errors found in the project en page_Productlist exist.
So my question: What am I doing wrong? (I'm a newbe).

TIA

Herro Wijnholds
Herro
Re: WB18 MenuAddOption with parameter
October 19, 2013 08:06PM
Nobody uses this option?

Best Regards
Herro Wijnholds
Piet van Zanten
Re: WB18 MenuAddOption with parameter
October 20, 2013 12:51PM
Hi Herro,

I use similar code and it works fine.
The only difference I see is that in your case the caption and the option name are the same (I use OPT_ as a prefix for the option)
Though that should not be a problem, you might try to add a prefix.

Regards,
Piet
Herro
Re: WB18 MenuAddOption with parameter
October 20, 2013 02:01PM
Hi Piet,

Thanks for your reply.

I already tried a different names (option/description) but the problem is still there.
My site is a Dynamic PHP site. (not en Dynamic WebDev).

I also regenerated the project.

As a workaround I created several global procedures. (for each menu option a different procedure).

Regards,
Herro
Re: WB18 MenuAddOption with parameter
December 22, 2023 06:14PM
Hello everyone
Although these posts were a long time ago, I will follow up because I have the same problem.
My question is how can I pass a procedure Parameter to a Wlanguage procedure?
I've been trying for a while but no luck

<Result> = <Source menu>.AddOption(<Option to create> , <Caption> , <WLanguage procedure> [, <Procedure parameter>])

[infosonline.net]
Re: WB18 MenuAddOption with parameter
December 22, 2023 10:59PM
I solved the problem, set the procedure
Procedure (IDitem is int)

The parameter from the AdOption menu writes the IDitem variable

The only problem left for me is how to keep the Menu expanded, I can't find an option to expand the Menu, every time after clicking with the mouse the Menu collapses

[infosonline.net]



Edited 2 time(s). Last edit at 12/22/2023 11:35PM by infos.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: