Class.setProperty

Not sure if this is a bug or intended behaviour but I am trying to dynamically change my image button’s style like below onClick - It seems that it doesn’t like my empty value. In the second example, if I give an actual value, it works.

isc.ImgButton.create({
    ID: "alignLeft",
    size: 45,
    src: "icons/24/text_align_left.png",
    showRollOver: false,
    showFocused: false, click: function(){this.setProperty("baseStyle", "");this.redraw();},
    baseStyle: "myOtherGridCellSelected"
});
isc.ImgButton.create({
    ID: "alignLeft",
    size: 45,
    src: "icons/24/text_align_left.png",
    showRollOver: false,showDown: false,
    showFocused: false, click: function(){this.setProperty("baseStyle", "myBoxedGridCellOverDark" );this.setProperty("styleName", "myBoxedGridCellOverDark" );this.redraw();},
    baseStyle: "myOtherGridCellSelected"
});

It’s being ignored as an apparently invalid styleName - use a blank style definition instead. (eg .emptyStyle {})

Is this issue completely unrelated to SmartClient?

Sort of. It could be argued that given a null String SmartClient should wipe out the style property, but that’s not what the API does. So you’ll need to pass an empty style.