Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two forms
Message
From
18/06/2001 12:39:05
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
18/06/2001 11:53:08
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00520638
Message ID:
00520656
Views:
14
>Hi, I have 2 forms in same time (form1 and form2). In form2 i click in botton to release the form1 example (form1.release) and the message error appears:
>
>"Object FORM1 is not found"
>
>Please help me
>
>thank you all

Form2 needs a reference to Form1 in order to access its Release(). You could store a reference, oForm1 as a property of Form2, then This.oForm1.Release(). The better, OOP-er/OOP-ish, way would be to have a collection (array) of forms used by your application. Then, you would call to the collection to release the form. That way, no form needs to know about any other form. It calls the object responsible for knowing about forms, the collection object.

In our framework, Mere Mortals, we have an oForms collection. In each form's Init(), it registers itself with the collection. Upon Release(), it unregisters itself. Then, if a form needs to reference another, we call oForms.Get('AnotherForm') and it returns either the reference to 'AnotherForm' or .NULL. if that form isn't currently available. Hope that helps,
---J
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform