SYSTEM object
From a tool-developers point of view one of the weaker areas in the Presentation Server has always been the lack of a "reflection API", i.e. a way to discover what properties, methods and events an object actually supports at runtime. This in turn has led to creating manual lists and records of object attributes, bringing with it the inherent difficulty of keeping this information up-to-date as new features are added.
Primarily designed with the new PS-based Form Designer in mind, this shortcoming has been addressed in OpenInsight 10 with the addition of the following new methods to the SYSTEM object:
Each of these methods takes a single argument which is the type of object to query.
Note that when these methods return the type of data for a property or argument there are some cases where only a broad hint is given - Basic+ is an untyped language so it is not really feasible to accurately describe some types using a simple set of flags - e.g. in the case where an argument is a complex dynamic array containing a variety of other core data types such as strings and numbers.
While aimed mainly at developers who write development tools for OpenInsight, this API may still be of interest for those of you who like to write your own diagnostic and debugging tools - when a new property, method or event is added to the Presentation Server it is clearly exposed thereby reducing the likelihood of it remaining hidden and undocumented.
buttonProperties = exec_Method( "SYSTEM", "REFLECT_PROPERTIES", "PUSHBUTTON" ) buttonMethods = exec_Method( "SYSTEM", "REFELCT_METHODS", "PUSHBUTTON" ) buttonEvents = exec_Method( "SYSTEM", "REFELCT_EVENTS", "PUSHBUTTON" )