10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table Field OperationsFor example, the following code first checks whether the cursor is on a formfield. If it is, the code checks whether the current field is a table field. If thecurrent field is not a table field, the code sends an appropriate message to theuser.table_field = null;if CurFrame.InputFocusField is not null thentable_field =CurFrame.InputFocusField.WhichTableField();endif;if table_field is null thenmessage 'You must be in a table field tosort it.';resume;endif;If the input focus is not on any field when the WhichTableField method isinvoked, an error message is written to the trace window and the log file.This code checks that the field is not null before proceeding, thus preventingthe trace window message.If the field is a table field, the WhichTableField method returns the table fieldto the user-defined variable table_field. You can obtain information about thistable field using attributes and methods provided by the OpenROAD systemclasses. For example, you can:• Access array valuesTo manipulate values in the underlying array, you need a referencevariable that points to it. To load values from the underlying array into thearray reference variable, use the GetFieldValue method of the FieldObjectsystem class, for example:...tf_array = ArrayObject default null;...table_field.GetFieldValue(value = byref(tf_array));250 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!