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 Manipulate Data in Dynamic FieldsHow You Can Access Individual Cells of a Dynamic Table FieldYou cannot use the GetFieldValue and SetFieldValue methods to obtain orchange data values in cells in a dynamic table field. Use the followingprocedure to access the values in an array underlying a dynamic table fieldTo access the values in an array underlying a dynamic table field, you wouldperform the following basic steps:1. Create a dynamic expression—an object of the DynExpr system class thatrepresents an expression that can be reevaluated dynamically or a variablethat can be reevaluated or assigned dynamically.2. Use one of the following methods, defined for the DynExpr system class, toget or set values:AssignAssigns the value of one dynamic expression to anotherGetValuePuts the value of the field referenced by the dynamic expression into avariableSetValueHow You Can Create a Dynamic ExpressionPuts the value of an expression into the field referenced by thedynamic expressionYou create DynExpr objects by invoking the CreateDynExpr method on anobject of the Scope class. The Scope object represents the context forevaluation of the DynExpr object. The dynamic expression is no longer validwhen its scope terminates, that is, when its associated application, frame, orother component, closes.The CreateDynExpr method takes the following parameters:stringContains any syntactically valid OpenROAD expression except procedure ormethod invocations. Use the string parameter to specify the field or tablefield cell whose value you want to access. This parameter (which takesvarchar values) can reference the field directly or can contain a validOpenROAD expression that references the field.The value of the string parameter is loaded into the dynamic expressioncreated by the CreateDynExpr method. You can then use the dynamicexpression to access the value of the field or cell originally specified.Creating Dynamic Frames 385

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

Saved successfully!

Ooh no, something went wrong!