Announcements
Hello,
I have 2 menu Items, a menu item has a parameter, another one have not.
I can read the parameter in Main method inside Class
However, although my variable is in the same class and defined in ClassDeclaration, the value in the dialog method is empty.
Dialog method opens another form, I want to make operations on the form according to the selected menuit, but I could not move the parameter on the menu item to the form.
It fills and sends args in the class's dialog method. You are probably filling the parm (meiloParmAuto) after args is filled. It's not that important, you can directly add parm to args and send the value.
I call with my new menu item with parameter.
How did you call the form in the class. (The last two pictures you posted are the same, I think the pictures are mixed)
Hi Martin and Ergün,
Thank you for interest.
I have the variable in ClassDeleration
Also I added parm method
I first call my menu item, the menu item has a parameter.
I call the parm method in the Main. My variable is loaded
I can't see the parameter in same class in init method.
also I can't see the variable in Form init method
actually I need the variable on the menu item on the form. I'm trying to move the forum over the class because it opens a class. Could there be a different method?
I can see the parameter value in main method, If I can see other method my problem will be solved
Technically, the main method is static. You cannot use global variables inside static methods.
Now you have two different variables with the same names. If you want to use global value, you need to fill it with parm methods.
Do you have any code to populate the instance variable (the variable defined in ClassDeclaration)?
Your code in main() assign the value to a local variable, but it isn't used anywhere and therefore the value disappears at the end of main() without having any effect on your program.
If args is already passed to the class, take the value from there inside an instance. It it's not, create a parm method and call it from main() to set the value.
ledgerBalanceSheetDimP.parmMelioParmAuto(args.parm());
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator