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.

Event-based <strong>Programming</strong>For example, a frame receives a ChildEntry event when any of its child fieldsreceives an Entry event. The following ChildEntry event block changes thecolor of the field that the user has entered to pale cyan. This code uses theTriggerField attribute of the FrameExec system class to determine which entryfield triggered the current event:on childentry =beginif CurFrame.TriggerField.ISA(class =EntryField) = TRUE thenEntryField(CurFrame.TriggerField).BgColor=CC_PALE_CYAN;endif;endWindowClose and Terminate are two other important frame events:WindowCloseIs triggered when the user selects the window manager close operation forthe running frame.TerminateIs triggered in any of the following circumstances:• When the frame is closed by the Terminate method• When the frame's parent frame closes itself• When the frame's parent is itself closed by another frame or procedure• When the user selects the window manager Close operation for therunning frameYou can use an event block for either the WindowClose or Terminate events toclean up a frame (for example, to close open transactions) prior to closing it.To keep the window open under specified circumstances, use the WindowCloseevent. For more information about keeping a window open after aWindowClose event has been triggered, see How You Can Interrupt an EventBlock (see page 328).The UserEvent event, which is a user-defined event used primarily forcommunicating between frames and with external programs, is also considereda frame event. For more information about this event, see Inter-FrameCommunication Techniques (see page 333).For more information about OpenROAD events in general, see the LanguageReference <strong>Guide</strong> online help.322 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!