Announcement

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

    Multiple handlers on a widget

    Hi,
    We are making the transition from SmartGWT to SmartClient Just wondering if it's possible to add multiple handlers to a single widget.

    For example, in SmartGWT we were able to add handlers on a button using the addClickhandler method :

    Button test= new Button("Test Button);
    test.addClickHandler(new ClickHandler() { ... } );
    test.addClickHandler(new ClickHandler() { ... } );

    In SmartClient we have to define the click function ex.:
    var functionObj = isc.ToolStripButton.create({
    click: function () {...} });

    I don't see the possibility of adding more than one handler since we just simply define the click function.

    Is there a similar mechanism to addClickHandler for SmartClient or do we have to manage them?

    Thanks

    #2
    The most direct way to do this in SmartClient is Class.observe(), which actually allows multiple handlers on any method, not just those designated as events.

    Comment

    Working...
    X