Attrib

Hi talkers,
Progress V9
Windows

How do I do the ADM2 equvelant of RUN set-attribute IN adm-broker-hdl (INPUT attrib). I wish to use attributes in ADM2/Progress V9. I used these a lot in ADM (V8). I know the syntax for GET / SET. Though a window does not support these methods. Any help on how I can set an attrib + WHAT does this apply to.

Regards
 
We used to have the same problem. Actually we made 1 general super procedure which collects the most important data (user name,...) These data are collected by use of an include file.
/* Start of include file */
def var charName as character.

assign charName = dynamic-function('getName':U).
/* End of include file */

To put other variables onto a program, we usually use a function which is called to the target-procedure, eg
Dynamic-function('putChosendata',
input char1,
input char2,
input int1).

Hopes this will help you a bit...

mpowell_esq said:
Hi talkers,
Progress V9
Windows

How do I do the ADM2 equvelant of RUN set-attribute IN adm-broker-hdl (INPUT attrib). I wish to use attributes in ADM2/Progress V9. I used these a lot in ADM (V8). I know the syntax for GET / SET. Though a window does not support these methods. Any help on how I can set an attrib + WHAT does this apply to.

Regards
 
In ADM1 you would run set-attribute IN adm-broker-hdl (INPUT attrib).

In ADM2, you should be able to call the functions getUserProperty(name) and setUserProperty(name,value). These functions are provided for all SmartObjects so you should be able to call them from anywhere.

Unlike ADM1 however, these functions aren't global. When you set a property in an object, it belongs to that object only, so trying to retrieve the same value from an other object will not work.
 
I am guessing though that this works 'setUserProperty(name) IN handle' will work. This should cover the problem of not being a global attribute in ADM2.
 
Correct!

You might want to nominate one object as the repository for such attributes - something that is always running in the background.

Sharing the handle to this procedure is quite easy. A session variable will do it nicely. Just include this line in all objects:

DEFINE NEW GLOBAL SHARED VARIABLE hBroker AS HANDLE NO-UNDO.

And assign it in the nominated object only (say, in the MAIN-BLOCK):

ASSIGN hBroker = THIS-PROCEDURE.
 
Back
Top