Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | doEvent.eventName SEARCH    

  Functions
?
doEvent.eventName
event.end
event.eventName
for
for.exit
for.next
function.end
function.functionName
if
if.else
if.end
return
while
while.end
while.exit

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Statement
doEvent.eventName

Language: MioScript
Product: MioFactory


Syntax

doEvent.eventName(delay, windowID)


Parameters

INTdelayDelay, in millisecond.
MioEngine waits for the specified delay before the code is executed.
IDwindowIDOptional.
ID of a window to be retrieved with window.eventAuthor from the code of the event.


Return value

No value is returned.


Description

Requests the execution of a block of code.

eventName is the name of an event declared with event.eventName.

MioEngine maintains an internal list of events to be executed. Event are added in the list and are executed when the delay specified is reached.
If no delay is specified, the event is still added in the list, and will be executed when the older events in the list will be processed.

When the doEvent statement is reached, the execution of the current block of code is not stopped.

See also: event.eventName, event.end, window.eventAuthor

More information: MioScript: Events




MioScript Sample Code

// Sample 1: Simple call of an event

event.load
    ...
    doEvent.myEvent()
event.end

event.myEvent
    ...
event.end


// Sample 2: Call of an event using a variable

event.load
    ...
    &myEvent = eventName
    doEvent.&myEvent()
event.end

event.myEvent
    ...
event.end


// Sample 3: Order of execution

event.load
    alert("In event.load, step A")
    doEvent.doAlert()
    alert("In event.load, step B")
event.end

event.doAlert
    alert("In event.doAlert")
event.end

// The alerts are prompted in this order:
// -> In event.load, step A
// -> In event.load, step B
// -> In event.doEvent