Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » why not StaticText::SetData != StaticText::SetText
why not StaticText::SetData != StaticText::SetText [message #30016] Fri, 03 December 2010 11:29 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi guys

StaticText and Label have empty GetData() / SetData()
and one cant set the text trough them. but it'd be great
is there a reason why?

wo why not mapping GetData / SetData to GetText / SetText
i.e.:

virtual void SetData(const Value& v) { SetText(AsString(v)); }
virtual Value GetData() const { return GetText(); }

note the conversion above, to surely be able to display everyting..

or do StaticText / Label have special implications in terms of Ctrl usage?

i know of DataPusher, which is sort of sth like the same, isn't it?
but for StaticText Label, it'd be really great as well
Re: why not StaticText::SetData != StaticText::SetText [message #30017 is a reply to message #30016] Fri, 03 December 2010 11:56 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
I agree.

Best regards
IƱaki
Re: why not StaticText::SetData != StaticText::SetText [message #30018 is a reply to message #30017] Fri, 03 December 2010 12:09 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i asked mirek once for ProgressIndicator...
http://www.ultimatepp.org/forum/index.php?t=msg&goto=293 35&#msg_29335

hi response is sort of logical,
Quote:


Not quite sure it is completely right:

ProgressIndicator is kind of static value - user cannot change it. So far the policy was that only widgets that are editable have Value.

The reason is that if you want to store all user supplied values in the dialog, you can simply go through all widgets and store the value if it is not Value::Void - that indicates that the widget does not have associated value.



but i'd prefer to have them all be accessible via the GetSetData as well, and in case of restoring sth..just make sure that exceptions are reinitialized well after restoring..
Re: why not StaticText::SetData != StaticText::SetText [message #30020 is a reply to message #30018] Fri, 03 December 2010 13:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am sorry, but my "sort of logical" explanation still stands Smile

SetData = SetText for Label would result in problems with "mass" processing.

All in all, it would even mean breaking the code compatibility.

Mirek
Re: why not StaticText::SetData != StaticText::SetText [message #30021 is a reply to message #30020] Fri, 03 December 2010 14:12 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
got it...
what 'mass' processing?
Re: why not StaticText::SetData != StaticText::SetText [message #30031 is a reply to message #30021] Sat, 04 December 2010 16:15 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Fri, 03 December 2010 08:12

got it...
what 'mass' processing?


E.g. storing the content of dialog to disk using its Serialize...

Or creating backup for Cancel.
Previous Topic: [bug report]problem about processing WM_PAINT message
Next Topic: CtrlCore.h const correctnes fixes
Goto Forum:
  


Current Time: Thu Mar 28 10:37:26 CET 2024

Total time taken to generate the page: 0.01361 seconds