Page 1 of 1

Something about setText

Posted: Fri Oct 16, 2009 08:45
by lcy03406
I know many setter functions test the new setting and the old one first, and invalidate the window only if the setting is actually changed. But setText does not test, but invalidate the window and also it's renderedString on every time setText called. Is this intended? Maybe any decision about the RenderStringParser?

:?: LCY

Re: Something about setText

Posted: Fri Oct 16, 2009 12:17
by CrazyEddie
Hi, yes this is intentional. Mainly because testing a float, int or bool value is a trivial operation, whereas comparing two strings may not be. If it's an issue you just do the comparison yourself prior to setting the text.

CE.