:: Forum >>

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.
Thursday, March 2, 2006
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.
Thursday, March 2, 2006

setClass() expects name and value arguments -


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)
Friday, March 3, 2006
Aha, excellent, thanks for updating the wiki page on how it works. The tip on passing a function is, well, awesome.

Saturday, March 4, 2006

This topic is archived.

Back to support forum

Forum search