Kbase 21502: ADM2. How-To Access Properties Not Exposed By Functions
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
ADM2. How To Access ADM2 Properties which have no API to access them and show not accessible by Functions
FACT(s) (Environment):
Progress 9.x
CAUSE:
The ADM2 uses properties to manage virtually everything from UI state to data management.
A great deal of these properties are exposed by an API in the class that defines them. For example, the setDataSource & getDataSource functions expose the ability to set and get the value of the DataSource property from the ADMProps temp-table.
Some of the properties, however, have no API to expose them. This makes it difficult when trying to customize the feature they are associated with.
FIX:
Let's say you are using the SmartSelect instance of the SmartDataField and you wish to modify something about how the Fill-in is displayed, whether it be font, color or something else.
There is a property in the select.p class called SelectionHandle... This is the handle to the Fill-in on the visualization of the SmartSelect.
If you need to get this handle, there is no function or API that exposes this. So, in order to do this you must first define a preprocessor for this property, prefixed with the letters 'xp'. Then use the get or set include files to access the property's value.
Example
DEFINE VARIABLE hFillIn AS HANDLE NO-UNDO.
&SCOPED-DEFINE xpSelectionHandle
/*-----------------------------------------------*/
/* get = include file */
/* SelectionHandle = Property Name */
/* hFillIn = Variable to store value */
/* h_dynselect = Handle to SmartSelect procedure */
/*-----------------------------------------------*/
{get SelectionHandle hFillIn h_dynselect}.
&UNDEFINE xpSelectionHandle