Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Timeline addBackgroundClickHandler event not generated

    1. SmartClient Version v10.0p_2015-03-14/Power Edition Deployment
    (built 2015-03-14)

    2. Browser IE 11.0.9 and Firefox 13.0
    Be sure your post includes:


    I'm trying to generate a action based of the selection of a timeline cell that contains no events. I thought that by adding a backgroundClickHandler an event would be generated when a empty cell was selected. In the event handler I hope to among other things call timeline.getLaneFromPoint to get the lane, also want to get lane headers. Anyway

    My call back looks like: (copied by hand from a another system)

    timeline.addBackgroundClickHandler( new BackgroundClickHandler(){
    @Override
    public void onBackgroundClick(BackgroundClickEvent event) {
    SC.say("Made it");
    }
    }

    In my full code just before I add this event handler I call timeline.addDateChangedHandler which works fine.

    Is my understanding of backgroundClickHander incorrect/Am I doing something wrong or is this a bug.


    Thanks ....

    #2
    As it turns out the canCreateEvents(true) must be set on the timeline for this event to fired. This seems a bit counter intuitive to me however the event provided with the callback has a cancel method which lets me ignore the edit and still get the callback.

    Thanks

    Comment

    Working...
    X