As long as the public variable is only used for this, and it could never 
be anything else, you'll not find problems. It isn't something I recommend.

It can be faster than a loop of _Screen.forms(). If you make it public 
at the get go (in your main prg), you could use the Try/Catch method Ed 
mentioned.

try
        ShowData.mymethod(...)
catch
        do form ...
endtry

There's plenty of ways to accomplish the task.

Good luck with it,

Tracy

Paul Newton wrote:
> Ed, Tracy
> 
> You were both along the right lines.
> 
> Tracy Pearson wrote:
>> If ShowData isn't a public variable, and this is happening in a method, 
>> it's only private until that method goes away.
> I solved it by putting  a PUBLIC ShowData statement before the first 
> call to the child form:
> 
>     IF NOT WEXIST("ShowData")
>       PUBLIC ShowData
>         DO FORM ShowData WITH param1,param &&  NAME ShowData
>     ELSE
>         ShowData.MyMethod(param1,param2)
>     ENDIF
> 
> I am not sure if this is the most aesthetically satisfying approach, but it 
> certainly works very nicely.
> 
> Many thanks
> 
> Paul Newton
> 
> 
> 
> 
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to