Hey Mobi,

2010/3/28 mobi phil <[email protected]>:
> If it is not the case, please ignore, if yes pls. correct
>
> description:
>
> the documentation says:
>
>
> bool Wt::WString::refresh       (                )
>
> Refreshes the string.
>
> For a localized string, its value is resolved again.
>
> Returns whether the value has (potentially) changed.
>
>
> looking at the code:
>
>
>
> bool WString::refresh()
> {
>  if (literal())
>    return false;
>  else
>    return true;
> }
>
>
> maybe I miss sthg., but it does not seem that the string will indeed
> refresh if locales changed, or?

It will refresh, because the string's value will be different next
time it is resolved (regardless of the invocation of refresh()).
Rather than storing the old value, retrieving the new value, and
comparing them, the method pessimistically returns true because that
eliminates the need to hold the resolved value.

Regards,
koen

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to