![]() |
<< Index >> |
FutureBasic |
on dialog | statement | |
|
userFunction
userFunction
to handle events. It is called in response to a number of different kinds of user actions and internal events.userFunction
must refer to a function which was defined or prototyped at an earlier location in the source code.
// ...
User function
The user function provides access to dynamic event information as it occurs in your application. FutureBasic's runtime sends event notifications to the event-handling
function (established with the
Parameters
Parameter |
Description |
ev | The event type. Event types are shown in the header for the specific user interface widgets such as textfield, window, combobox, etc. |
tag | Usually the tag number of the UI widget that triggered the event. |
wnd | The window tag value. |
obj | A CF/NS object. Which object type it represents varies based on context and each context could be a different object. For example, for the _openPanelDidEnd event, it is a CFURLRef. |
Examples
These examples assume a user event-handling function has been designated with the name "DoDialog"
via
a "DoDialog
".
DoDialog( ev
long )
// ...
DoDialog( ev
long, tag
long )
// ...
DoDialog( ev
long, tag
long, wnd
long )
( ev )
_btnClick
( wnd )
1 // window id 1
// do something with button click in window 1
2 // window id 2
// do something with button click in window 2
DoDialog( ev
long, tag
long, wnd
long, obj
CFTypeRef )
( ev )
_viewPerformDragOperation
// obj contains a file URL
// ...