Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to release multiple forms?
Message
 
To
20/06/1998 17:02:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00110278
Message ID:
00110282
Views:
23
Hi Peter,

There would be several ways to achieve this. One of the approach would be to create a lightweight class and instantiate it when you run the customer lookup form. This object would have a method called Register() whose purpose would be to receive a form name as a parameter, and instanantiate the form and hold an object reference to the new form in its array property.

Again when the Customer Details form calls the Customer Orders form you could call the same method again Register('CustomerDetail') etc.

Another method in this class would then release each object reference and release them.

Such a design pattern (Observer) is usually used when activities on different objects need to be observed and syncronized but it works very well in such situations as well.

Further, you could add a property to the object say CustId or Customer Name and you would know which customer any instantiated form belongs to.

>I am using DO FORM to call a heirarchy of forms. I have a customer lookup form with calls a customer details form, which calls an order details form which calls an order totals form. Now, when the user clicks Save on the Order Totals form, I want to release the three forms, and have the user return to the customer lookup form (the top form). What is the easiest way to do this?
>
>TIA, Peter Renton
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform