3.2.0

AW.HTML.DIV:setClass bug?

var AssetPanel = new AW.HTML.DIV;
AssetPanel.setSize( 209, 278 );
AssetPanel.setPosition( 523, 342 );
AssetPanel.setClass( "panel" );
document.write( AssetPanel );


Using the DOM inspector with Firefox shows that the class is set as aw-panel-undefined.

I'm assuming this is not intentional.
Eric
March 2,
Sorry, posted too quickly. Passing a second argument "" to setClass almost correctly gives aw-panel-. I'd expect it to give aw-panel if the second argument is missing. Should be easy (and small) to patch in for the next release.
Eric
March 2,
Eric,

setClass() expects name and value arguments -

http://www.activewidgets.com/aw.system.html/setclass.html

So setClass( "panel" ); should, in fact, completely remove any .aw-panel-* class if it was set previously. So this is still a bug, but intention is slightly different.

Alex (ActiveWidgets)
March 3,
Aha, excellent, thanks for updating the wiki page on how it works. The tip on passing a function is, well, awesome.

Thanks!
Eric
March 4,

This topic is archived.

See also:


Back to support forum