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 Objects Generically: CastingOriginatorFieldContains the field defined in the on event statement that originated thespecified event. For example, assume that you code a ChildExit eventblock for a composite field (On ChildExit CompField). Whenever the userexits any of the child fields composing CompField, the OriginatorFieldattribute contains the composite field name, CompField. In contrast, theTriggerField attribute contains the name of the specific child field that theuser exited.This attribute is particularly useful when you have multiple events definingthe same event block. For example, if you have a radio field and menu listthat you use to enable multiple interfaces to the same action and you wantto keep them synchronized, you could use the following code:on click TestRadioField,on click TestMenuList =beginif CurFrame.OriginatorField =field(TestRadioField)thenTestMenuList = TestRadioField;elseTestRadioField = TestMenuList;endif;/* common code goes here */end;TargetFieldContains the name of the field that will next have the input focus(assuming the focus is not moved)How You Can Work with MethodsAssume you send a StringObject as a MessageObject from FrameA to FrameB,and you want to use the WriteToFile method on the MessageObject in FrameB.Because WriteToFile is defined for the StringObject class, you must cast themessage object to avoid a compile error when you use the WriteToFile method.FrameA contains the following statement:FrameB_exec.SendUserEvent(EventName = 'Send_String',MessageObject = string_file);Working with Classes 141

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

Saved successfully!

Ooh no, something went wrong!