Hey Adrian,

2009/6/23 Adrian Sutherland <[email protected]>
> Supplementary - does Wt detect no-op changes like setting style class to the 
> existing style, etc. (as well as text changes)? Or is it better that I 
> remember the old values and only call set methods when I need to?

WWidget::setStyleClass() is a bit of an exception: we always propagate
this because this is typically also an attribute that is changed from
client-side JavaScript routines. You should thus make it a no-op
yourself by checking it:

if (w->styleClass() != newStyle)
  w->setStyleClass(newStyle);

Many other widget properties have been optimized to detect no-ops, but
this has not been done for every property.

Regards,
koen

------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to