Futurebasic/Language/Reference/on dialog

From Wikibooks, open books for an open world
< Futurebasic | Language | Reference
Jump to: navigation, search

Contents

[edit] ON DIALOG

[edit] Statement

✔ Appearance ✔ Standard ✔ Console

[edit] Syntax

ON DIALOG {FN userFunction|GOSUB{lineNumber|"stmtLabel"}} 

[edit] Description

This statement designates a particular function or subroutine as a dialog-event handling routine. A dialog-event handling routine is called in response to a number of different kinds of user actions and internal events; see the DIALOG function for more information. After a dialog event occurs, FB does not call your designated routine immediately. Instead, your program continues executing until a HANDLEEVENTS statement is reached. At that time, HANDLEEVENTS will call your designated routine once for each dialog event that occurred; your designated routine should examine the DIALOG(0) and DIALOG(evnt) functions to get information about the event. If you have not designated any dialog-event handling routine, FB ignores events of this kind.

Note: If you use the ON DIALOG FN userFunction syntax, then userFunction must refer to a function which was defined or prototyped at an earlier location in the source code. Your dialog-event handling function should not take any parameters, nor return a result.

[edit] See Also

DIALOG function; DIALOG statement; HANDLEEVENTS

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export