>Hi,
> I am designing to develop Form Manager as my framework. I have a form manager to control the forms, and I have form object to corperate with form manager.
> I would like to know that, how would the form recognize the reference of form manager since the reference name is not constant by user? Do I need to force the reference name?
>
>Thank you
John,
Here's how I do it. All fomrs are run by teh form manager. When the fomr manager runs a form it passes a refernce to itself to the fomr with;
DO FORM Form1 WITH THIS, UniqueIdentifier
All forms are subclasses of my frmBase class. In the frmBase class I have added a property named oCreator and in the Init I;
LPARAMETERS poCreator, pcTag
ThisFrom.oCreator = poCreator
ThisForm.Tag = pcTag
...
The form manager keeps an array property with a row for everyform the exists. In column 1 of the array is the form object refernce and in column 2 is the UniqueIdentifier for that form (my array actually ahs more than 2 columns the others aren't important for this discussion).
Now, whenever a form has to talk to the manager it simply says;
Thisform.oCreator.Whatever
If the manager needs to know which from called the tag can be passed as an argument as in;
Thisform.oCreator.Whatever(Thisform.Tag)