For handling multiple actions on one Event-Type of an object, we need to implement an event queue that handles hall events item by item. This should fairly be easy, but it has to be done.
Am I right in thinking the event queue should allow mutiple event handlers of one event type to be added to an object without over writing each other, so that each event handler is executed in a fifo when the event occurs? For example:
As the code currently stands, the code above will produce a panel, which when clicked turns from being silver in colour to being red, but there will never be a javascript alert saying 'clicked'.
Is the way you want it to work that both the event handlers are added to a queue, so when the panel is clicked you first get a javascript alert saying 'clicked!', then the panel turns red?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=2000579
Originator: NO
Hi,
Just trying to wokr out exactly what you wanted.
Am I right in thinking the event queue should allow mutiple event handlers of one event type to be added to an object without over writing each other, so that each event handler is executed in a fifo when the event occurs? For example:
<?php
require_once("header.php");
$panel = new wuiPanel("test");
$panel->setBackcolor("silver");
$panel->setForecolor("black");
$panel->setSize(200, 200);
enter_eventmode($panel);
$panel->Dset_event("javascript::onmouseclick", "alert('clicked!')");
$panel->Dset_event("javascript::onmouseclick", "this.style.background = 'red'");
echo $panel->render();
?>
As the code currently stands, the code above will produce a panel, which when clicked turns from being silver in colour to being red, but there will never be a javascript alert saying 'clicked'.
Is the way you want it to work that both the event handlers are added to a queue, so when the panel is clicked you first get a javascript alert saying 'clicked!', then the panel turns red?
Logged In: YES
user_id=1978199
Originator: YES
You are perfectly right. Thats what I wanted!