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.

Using an Object-oriented Approach to <strong>Programming</strong>The following example illustrates this:field(acctno_form.acctno).MarkAllText();A method may return a value. You must specify a variable name to receive thereturn value. The syntax is:variable = reference_variable.method([parameter_list])variableSpecifies any variable in the current scope and must have an appropriatedata typeThe following example specifies the video variable to hold the return value forthe Create method (that is, to be the object created):video = VIDEO_ROW.Create();When the method returns a value, you can use it as an expression or as partof an expression in an OpenROAD statement. The following example uses thevalue set by the user's response in an expression:if CurFrame.ConfirmPopup(messagetext ='some message') = PU_OK then ...;For a complete list of the methods that are defined for each system class andfor the data type of each method's return value, see the Language Reference<strong>Guide</strong> online help.Using an Object-oriented Approach to <strong>Programming</strong>User classes let you take an object-oriented approach to your data. Ratherthan writing table-oriented applications with database access specified in frameand procedure scripts, you can create objects that reflect your workenvironment.For example, suppose that you have a database containing information about alibrary. There may be a table, Books, containing information about books inthe library. You can easily crate a user class, books, with attributes thatcorrespond to items in the Books table. The Class Editor lets you createattributes from a database table. After you create the class books, you canthen define useful methods. For example, a books class might have themethods CheckOut and CheckIn.When you create a frame, you can create fields that correspond to attributes ofa user class by using the Insert Fields from User Class menu option.120 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!