Menu

#1 Event Queue Implementation

Next Patch/Bugfix
open
6
2008-02-10
2008-02-08
No

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.

Discussion

  • Robin Barnes

    Robin Barnes - 2008-02-10

    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?

     
  • Christian Moeller

    Logged In: YES
    user_id=1978199
    Originator: YES

    You are perfectly right. Thats what I wanted!

     
  • Christian Moeller

    • milestone: 804807 --> Next Patch/Bugfix
    • priority: 5 --> 6
    • assigned_to: nobody --> rmbarnes
    • status: open --> pending
     
  • Christian Moeller

    • status: pending --> open
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.