On Jul 23, 2007, at 6:16 PM, Paul Newton wrote:

> I have a top level form which calls another (child) form (modeless,
> showwindow in top level form).  If the (putative) child form does not
> exist I want to DO FORM ShowData ... but if it has already been  
> "done" I
> want to "re-use" it and refresh it.  This is what I am doing in the
> parent form
>
>     IF NOT WEXIST("ShowData")
>         DO FORM ShowData WITH param1,param2 NAME ShowData
>     ELSE
>         ShowData.MyMethod(param1,param2)
>     ENDIF
>
> Unfortunately this does not work - the error message is "Object  
> showdata
> is not found"

        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 Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
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