Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loose the Object Reference in the FORM

Status
Not open for further replies.

TSWA

IS-IT--Management
Sep 27, 2001
66
PA
Hello, I develop application and I have problem in one Form. I will explain:
1. In the main.prg I use these codes:

DO FORMS FORMS\FRMINTRO
DO MENU01.MPR
READ EVENTS

2. When the Menu is Activated, I select a option, the option Run a .PRG, then a Form).
Code:
DO OPENTABLES1
DO FORMS FORMS\FRMMONITOR1

When I check the Debugger, only the Object Form FRMINTRO is available withing local variables. FRMMONITOR1 doesn't exist.

I define the Form FRMMONITOR1 as 0-Modeless, it display the Info and it has a GRID. I always use THISFORM.<Object>.caption to access or get info from Object.

The Grid contain column as Check Object, when I click on that, it execute a CLICK Method to Display other Form, and I reference to Object from the main Form(FRMMONITOR1) using THISFORM.Timer1.Enable=.F. and it send a Error indicating that this object doesn't exist. I don't understand but I always use THISFORM.CMDREFRESH.CLICK()(example) using this sentecen whiout the Grid, the command works whitout problem.

Please let me know what happend because I loose 2 days trying to fix this problem.

Thanks in Advance

Marlon

Best Regards from Panama
 
Try this

PUBLIC oFormIntro,oFormMonitor
DO FORMS FORMS\FRMINTRO NAME oFormIntro
DO MENU01.MPR
READ EVENTS

DO OPENTABLES1
DO FORMS FORMS\FRMMONITOR1 NAME oFormMonitor


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks for your response.

Sorry, I was Tired and couldn't see the typing error. I wrote: thisform.timer1.enable=.F.
The good sentence is: thisform.timer1.enabled=.F.

Thanks foru your support.

Marlon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top