Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects not visible
Message
 
To
14/11/2002 11:32:15
Victor Verheij
International Film Festival Rotterdam
Rotterdam, Netherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00719613
Message ID:
00722766
Views:
25
Victor,
I don't use forms, instead I create all of my forms as classes. Then within my application I can open the form (class) using the following syntax:
goApp.NewObject('oFormXXXX','frmClassName')  
goApp.oFormXXX.Show()
goApp.oFormXXX.Visible = .T.
This way, all forms within my application are part of the application object hierarchy and I can always reference them from within other parts of the app.

You may be able to do something similar using to DO FORM....NAME command to store the form as a property of goApp, however I haven't tried this.

Hope this helps,
Kurt

>hello kurt
>
>Thank you for your answer:
>(For you second question, 'goApp' is not really created until it's Init() method is finished executing. If you are trying to reference the application object from other objects during the Init() execution, you will get this error. Instead, try using THIS.Parent syntax from within your objects to reference the application object. This should work.)
>
>I've solved the problem (with your help) and now it works.
>However i think i've got a new (related to this) one.
>
>When i open a form in the init event of programatically defined class (goapp) i got an error when i reference a property of that class.
>Your solution to reference to this class by this.parent doesn't work here because the form is not a child from the goapp class.
>
>I still want to openen a 'default' form when I instatiate the goapp class.
>
>Any ideas on how to do this?
>
>tia, Victor
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform