|
|
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » FIX: StaticRect Color() method name clash
FIX: StaticRect Color() method name clash [message #30199] |
Wed, 15 December 2010 12:24  |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
hi all
StaticRect has got a Method
StaticCtrl.h:78
StaticRect& Color(class Color c) { Background(c); return *this; }
which is causing compile problems in own Ctrls based on StaticRect and using Color members.. because Color is then interpreted as method.
this should be changed to 'SetColor' or deleted completely..
EDIT: in fact, Scatter is filled with those 'class::Color' things exactly due to this. i think it should be corrected, otherwise the method is much more of a burden then a help.
EDIT: recompileing the ide,
Debugger/Dbg.cpp:198
Debugger/Pdb.cpp:178
About.cpp:31+33
use Color() method
EDIT:
some things that additionally use .Color() method
uppsrc/Docedit
uppsrc/reference/Slider
uppsrc/reference/Frame
bazaar/FormEditor
bazaar/SplashSV
and a cuple of
Quote: |
C:\uppsvn\uppdev\ErrorThread20070606\main.cpp(48): ctrl.Color(SWhite);
C:\uppsvn\uppdev\Frame3\main.cpp(7): r.Color(Blend(SColorShadow, SColorFace, 180));
C:\uppsvn\uppdev\GUISample1\main.cpp(14): F1.Color(Color(0x80, 0x80, 0x80));
C:\uppsvn\uppdev\Slider\main.cpp(30): dynarect.Color(SRed);
C:\uppsvn\uppdev\stdapp\stdappSplash.cpp(25): parent.Add(widgets.Create<StaticRect>().Color(SPLASH_PAPER_COLOR).SizePos());
C:\uppsvn\uppdev\uppCanvas\main.cpp(7): bottom_left.Color(LtGray);
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(119): rect.Color(White);
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(267):// scrollarea.work.Color(SRed); //not necessary... just to play with total...
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(333): if (numlabel > 2) a[ iboard[0] ].rect.Color(White);
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(337): a[board].rect.Color(Color(175,255,84)); // old return White
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(342): if (numlabel > 2) a[ iboard[1] ].rect.Color(White);
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(346): a[board].rect.Color(Color(175,255,84)); // old return White
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(604): a[ bb0 ].rect.Color(White);
C:\uppsvn\uppdev\VegaTeam5\ImproveColors.cpp(605): a[ bb1 ].rect.Color(White);
|
cheers
[Updated on: Sun, 26 December 2010 13:52] Report message to a moderator
|
|
|
|
|
Re: FIX: StaticRect Color() method name clash [message #31511 is a reply to message #31510] |
Tue, 08 March 2011 08:32   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
perfectly understand you..it's as always, in the balances, between cleaning code an keeping old stuff compileable.
after 2 or 3 years one easily can speak of 'porting' 
i think making code clean is quite important as well, w.r.t newcomers espcially. in my case, i was struggeling with this thing for hours, since deriving from StaticRect created problems and didnt know why..before i realized the problem. never expected it there.
again, it's even a thing that gets messed up the longer it pervails in code, since others continue using the screwed API, and esecially this one is nasty, it pllutes the code with class::Color stuff everywhere. people are going to continu to ask in forum 
cheers
EDIT: if desired i can send you a patch to what currently is affected in upp and bazaar...
[Updated on: Tue, 08 March 2011 11:15] Report message to a moderator
|
|
|
|
Re: FIX: StaticRect Color() method name clash [message #33159 is a reply to message #32140] |
Tue, 12 July 2011 10:02  |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
poke 
any chance to clean that out? code evolvement and cleanness is always in scales against BW compatibility. microsoft had this for years.. upp is small enough to grow a mature, clean and user friendly codebase. class::Color pitfalls are quite ugly...
we are doing quite large release cycles now, so why not considering this a 'major' fix, explicitly to be named in Changelog..
i can provide a patch for the whole upp directory (including bazaar)
[Updated on: Tue, 12 July 2011 10:04] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 19:01:43 CEST 2025
Total time taken to generate the page: 0.03152 seconds
|
|
|