Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about a public variable
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00285721
Message ID:
00285725
Views:
14
Hi Paul,

Try using _SCREEN.ActiveForm instead of THISFORM and see if that helps. For instance, this would be the code for the menu bar.

_SCREEN.ActiveForm.MyMethod()

HTH,
Evan Pauley

>I have a form where I want some options to be displayed on the main menu. So I create a new menu pad from this form's init, and release the menu pad from the form's release method. I want to run one of the form's methods when a menu bar is selected from this new menu pad.
>
>I tried the following command: oThisform = thisform so that I could reference "thisform's" methods. I get the error oThisform does not exist. I assume that this is because the form has a private datasession.
>
>Anyway, I then declared oThisform to be public and then everything seems to work fine.
>
>My question is, is there a problem with doing this? Is this defeating the purpose of having the form in a private datasession? Or maybe I'm worrying about nothing and it is ok to do this and then release oThisform from within the form's release method?
>
>thanks,
>Paul
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Reply
Map
View

Click here to load this message in the networking platform