General information
Category:
Coding, syntax & commands
Title:
This one has me baffled
A menu option calls the procedure with a parameter (the form to launch mFormName):
PROCEDURE LAUNCHFORM
1 if wexist(mFormName)
2 mCommand=mFormName+".Show"
3 &mCommand
4 else
5 do form &mFormName
6 endif
RETURN
which, to my simple mind should work.
Lets say the form has not been launched and so does not exist in this instance of the app. Calling the code above correctly launches the else portion and launches the form.
If I immediately call the procedure again, via a second call to the menu option, the code pukes at line 2 with the error "Object OUTGOING is not found". (OUTGOING being the value of mFormName). It has correctly identified that the window does exist - and it does because I can see it on the screen - but it ceases to exist in the sense that I can call its "Show" method.
A LIST OBJECTS at this point confirms that the object does not exist ... or does it ? Or is a window not an object ?
Gerry.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only