svghmi/svghmi.js
branchsvghmi
changeset 2836 ce6cecdb7320
parent 2834 6ac6a9dff594
child 2841 7c6050cde9e3
equal deleted inserted replaced
2835:bc666f020ab3 2836:ce6cecdb7320
    12             d[idxidx].call(widget, value, oldval);
    12             d[idxidx].call(widget, value, oldval);
    13         }/* else dispatch_0, ..., dispatch_n ? */
    13         }/* else dispatch_0, ..., dispatch_n ? */
    14         /*else {
    14         /*else {
    15             throw new Error("Dunno how to dispatch to widget at index = " + index);
    15             throw new Error("Dunno how to dispatch to widget at index = " + index);
    16         }*/
    16         }*/
       
    17     } catch(err) {
       
    18         console.log(err);
    17     }
    19     }
    18 }
    20 }
    19 
    21 
    20 function dispatch_value(index, value) {
    22 function dispatch_value(index, value) {
    21     let widgets = subscribers[index];
    23     let widgets = subscribers[index];
    36         let init = widget.init;
    38         let init = widget.init;
    37         if(typeof(init) == "function"){
    39         if(typeof(init) == "function"){
    38             try {
    40             try {
    39                 init.call(widget);
    41                 init.call(widget);
    40             } catch(err) {
    42             } catch(err) {
    41                 console.log("Widget initialization error : "+err.message);
    43                 console.log(err);
    42 
       
    43             }
    44             }
    44         }
    45         }
    45     });
    46     });
    46 };
    47 };
    47 
    48