Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form properties ignored - error returned
Message
From
07/05/2002 07:23:57
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00653191
Message ID:
00653414
Views:
19
>In my application, I have one main form which occassionally calls up other forms for specific data processing. I am having a problem with the properties of one of the called forms not be seen by procedures which reference them.
>
>Let's call the main form Form1. It calls a modal form, Form2, which calls another form Form3. Form3 references procedures found in a prg file called UTILTIES.PRG. This file contains many functions and procedures used throughout the program. For some reason, references to any property form3.x are not acknowledged. I get an error saying that the form3 does not exist. Form3 is open when the procedures are called, but so is Form2 which calls it and Form1 which calls Form2. Form3 references properties of Form1 and Form2 without any difficulty.
>
>Why don't the procedures see the properties of Form3? I have the SET PROCEDURE command referencing the UTILITY.PRG file and other functions and procedures in this file seem to have no difficulty reading the form properties of other secondary forms that the program calls elsewhere. Is it possible that the .PRG file will not see beyond two levels of form calls?
>
>TIA
>
>Richard Bates

I don't know how you try to access the forms - but just in case, I want to clarify that the Form.Name property doesn't help. You need form objects.

For instance:
DO FORM abc NAME oForm1
After that, you can access the form with the variable you declared (oForm1).

If you save your form as a class (named abc), use the following, instead:
oForm1 = CreateObject("abc")
oForm1.Visible = .T.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform