Home SQL PHP HTML Perl PowerBuilder C/C++ General Solutions Contacts

PowerBuilder

Index

Tips

Datawindow Timer
Executable Name
Include Objects
Is Executable?
Object Exists?

Objects

Downloads

Does Object Exist?

Purpose

To check if an object class exists in your application / library path

How To Use

I would suggest creating the following code as a non-visual class function, preferably as part of the application controller in a framework. It may equally be used anywhere, including as a global function. The function requires a single parameter, and a return type of boolean.

Code
Function

of_DoesObjectExist( readonly string as_classname ) returns boolean

Returns

Boolean
TRUE if object class exists
FALSE if object class does not exist

Suggestions

Useful when you're creating applications which rely upon dynamic object creation, can be used to prevent crashes by checking that the object class exists before creating an object or opening a window. Can also be used in debugging to check that you've included any dynamically created objects in your application.

Details

Author:     Wayne Jones
Created:    16 April 2003
Works with: All versions
This is Code, all contents copyright - © Wayne Jones 2004.