See Also: WebGet, WebSet, WebProperty meta-tag


Use this function in the Studio Debugger's Watches Panel to view web property values in your web application.

Note: Do not use this function in your application source code. Use the WebGet command instead.




(_wp({object-handle}, {property}))



{object-handle} - is a handle to the web object that owns the web property.

{property} - is the name of the web property as a literal string.


What it Does

When debugging an application in the Studio it is useful to query the value of an object's property in the Watches Panel. For a regular property this can be done by using the expression syntax to return the property value, i.e. (MyProperty(SomeObject)). This syntax cannot be used to retrieve the value of a web property.

Web property values are returned via the WebGet command. This will correctly retrieve the web property value from a special handler that synchronizes the web property value to the currently connected client. This handler also manages web property scope within the client call and the various states of the web property management system.

The _wp function is a special debugging function that can be typed as an expression in the Studio's Watches Panel to watch the value of a web property. This function will retrieve the web property value without going through the usual error trapping and, therefore, without disturbing your running application.

When the web property is not reachable the function will return a diagnostic message about the state of the web property handler and the validity of getting the web property value at that point in the application's execution stack.

This function is not intended to be used directly in your application's source code. Use the WebGet command instead.




(_wp(ghoWebApp, "psTheme"))

This adds the "psTheme" web property of the global cWebApp object to the Watches Panel. Notice that the web property name is passed as a literal string.

(_wp(oMyButton, "psCaption"))

This adds the "psCaption" web property to the Watches Panel for a web object named oMyButton. Note that the object is referenced using the object name but the property name is passed as a literal string.

(_wp(414, "psValue"))

Here the object is referenced by using the literal object handle value (414) of some web object. The psValue web property of this object is added to the Watches Panel.



Only web objects, based on the cWebObject class, can be referenced by the _wp function. This is because only web objects understand the web property interface.

If the web property value is not reachable then the function will return one of the following diagnostic messages:

Web properties handler not created

This message would be displayed while your web application is being loaded and initialized. It indicates that the web properties handler has not been created yet so the web application is not yet managing any web properties.

Web properties handler not available

This means that either: There is currently no client making any call to your web application so there are no web properties to retrieve; or, that a client is making a call but the web properties of that client are still being synchronized thus the web property system is not ready yet.

Your application code should not be reading web property values (WebGet) at this time.

Object handle not resolved

This means that the object handle passed to the _wp function is invalid and does not belong to any reachable object.

Object <name> does not support web properties

This means that the object handle passed to the _wp function does not belong to an object that understands the web property interface, i.e. it is not a web object and is not based on the cWebObject class.

<property-name> is not a web property of <object-name>

This means that the object handle does belong to a web object, but the named property is not part of that class's web property interface.

Object <name> is out of scope. Web property <name> not available

This means that the referenced object's web properties have not been synchronized during the current client call.

The Web Framework is designed to streamline web property synchronization by only synchronizing the web properties of the view that is currently active on the client plus all global web objects (cWebApp and its direct child web objects). In the case where the active view is a modal dialog then the view that activated the modal dialog (if any) is also synchronized.

Any web property belonging to any web object that is not part of this synchronization stack is considered to be out of scope during that particular client call and thus its synchronized value cannot be retrieved.