10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How You Can Reference ObjectsUse an assignment statement to assign a new value to the attribute. The basicformat is:reference_variable.attribute = expressionreference_variableSpecifies the name of the reference variable that points to the objectattributeSpecifies any one of the attributes defined for the object's system classexpressionSpecifies any 4GL expression that is the appropriate type for the particularattributeThe following example changes the mode of the current frame by setting thevalue of the CurMode attribute to FM_READ:CurFrame.CurMode = FM_READ;To set the value of an attribute for a field or menu item, you must use the fieldfunction in the assignment statement. The syntax is:field(display_variable).attribute = expressionThe following example uses the field function to set the value of the CurBiasattribute for the Create button:field(create_button).CurBias = FB_INVISIBLE;Note: When you set the value of an attribute for a child field inside a namedcomposite field, you must specify the full name of the field. To change the biasof the cname field in the customer subform, for example, you would use thefollowing statement:field(customer.cname).CurBias = FB_INVISIBLE;There are also occasions when you want to get an attribute's value. Forexample, you may want to learn which field has the current input focus orwhich field triggered an event. The process for getting the value of an attributeis very similar to that for setting one. Use an assignment statement to obtainthe value of the attribute. The basic format is:variable = reference_variable.attributevariableCan be a global variable or any variable. This variable must have anappropriate data type for the particular attribute.118 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!