Manfred_F
10 years agoRegular Contributor
distinguish Alias from Control
How can I determine, whether an object variable holds an alias (that does not exist) or a control(that also doesn't exist anymore)? An alias generates an errot "The OBject does not exist", if You ac...
- 10 years ago
Hi Tanya,
thank You for Your proposal.
I finally found the following approach that works:
(in pseudo-code)
// set auto-timeout to little value so we don't have to wait that long
// block TC error-logging, so we don't stop when we generate an error
// disable vbs error handling, too (accessing a non-existing control's property will raise an error)
// for a not yet existing alias, You get an object when accessing a property, for a no more existing control, You get an error
Result = isObject(myObject.Top)
// restore vbs error handling
// unblock TC error logging
// reset auto-timeout to former value
Regards,
Manfred