Announcement

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

    How to set widget event handlers dynamically ?

    I have one function which
    - throws an error at load time if declared statically as a handler of a SC widget event (concrete widget event: 'valueChanged' of a SC slider component)
    - throws no error AND functions properly when called in the onClick event handler of a regular HTML element

    This trouble function calls actually itself a function of an embedded 3rd party plugin object - which is said to not exist.

    I just wanted to control parameters of the 3rd party plugin content with the help of SC sliders ...

    All my playing and fiddling around has brought no solution - I am at this time scratching the surface of SmartClient/JavaScript ...

    What I had tried to do is: Set the handler of SC widget events DYNAMICALLY - e.g. after the page has fully loaded ...
    How can I do that ? E.g. change the "click()" event handler of a SC Canvas component or even the "valueChanged()" event handler of a SC Slider component at runtime ? If directly changing the name of the assigned event handler is NOT possible: Is it then possible to change the behaviour of assigned event handlers dynamically at runtime ? This would be the general question about changing function behaviour dynamically in SmartClient/JavaScript ...

    #2
    You can do so at any time via setProperty()/setProperties()

    Comment

    Working...
    X