If ShowData isn't a public variable, and this is happening in a method, 
it's only private until that method goes away.

You could bindevent to a public object, which you can raise when 
wexist(). The boundevent would call a method on the child form to 
reload, and bring it back to the front.

Or if wexist() you could activate window "ShowData". Now to get it to 
reload, you'll need _Screen.ActiveForm.methodtoreload()

Or if wexist() you could loop _screen.forms until you find the one that 
you want to bring back, call the method and bring it back to the foreground.

Plenty of ways to accomplish the task.

Tracy

MB Software Solutions wrote:
> Paul Newton wrote:
>> Ed Leafe wrote:
>>   
>>> First, the NAME argument to DO FORM simply creates a public memvar  
>>> with the given name. WEXIST() uses the actual 'Name' property of the  
>>> form.
>>>
>>>     Why not use TRY/CATCH?
>>>
>>> TRY
>>>     ShowData.MyMethod(param1,param2)
>>> CATCH
>>>     DO FORM ShowData WITH param1,param2 NAME ShowData
>>> ENDTRY
>>>   
>>>     
>> Ed
>>
>> Using the NAME clause was just an experiment which didn't work/make a 
>> difference.  The child form SCX is ShowData.SCX and has name (at design 
>> time) ShowData rather than the default Form1.
>>
>> I don't think TRY CATCH will help because, during debugging, when the 
>> child form is already visible the statement
>>
>>      ShowData.MyMethod(param1,param2)
>>
>> is giving the error.  It would give the same error as it gives now if it 
>> were invoked as part of the TRY clause
>>
>> Paul
>>   
> 
> So ShowData.scx is visible, yet your ShowData.MyMethod(param1,param2) 
> call is throwing the error?  I could see Ed's logic (brilliant!) that if 
> ShowData weren't existing, the CATCH would then instantiate it as expected.
> 


_______________________________________________
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