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++ 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 Go to next message
kohait00 is currently offline  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 #31501 is a reply to message #30199] Mon, 07 March 2011 11:03 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
just to poke you again,
is there plans to fix this somehow?
Re: FIX: StaticRect Color() method name clash [message #31510 is a reply to message #31501] Mon, 07 March 2011 23:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Mon, 07 March 2011 05:03

just to poke you again,
is there plans to fix this somehow?


Hm, it is a kind of small nuisance that we have learned to live with... Smile

As it affects only the StaticCtrl itself (or derived classes), it is IMO not worth breaking BW compatibility.

Mirek

(I might sound too careful with BW, but you do not know the feeling when I am on maintainance session and have request to make adjustments to some application that was not compiled for 2 or 3 years... Smile
Re: FIX: StaticRect Color() method name clash [message #31511 is a reply to message #31510] Tue, 08 March 2011 08:32 Go to previous messageGo to next message
kohait00 is currently offline  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' Wink
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 Smile

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 #32140 is a reply to message #31511] Wed, 27 April 2011 09:32 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i'd even vote for kickin' the Color() method completely, Background is there..

it's a short pain worth the effort.
Re: FIX: StaticRect Color() method name clash [message #33159 is a reply to message #32140] Tue, 12 July 2011 10:02 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
poke Smile

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

Previous Topic: Found solution. On arrayctrl, you have addcolumn, but what about deleting a column
Next Topic: Tab inside tab.. invoked through a button
Goto Forum:
  


Current Time: Fri Mar 29 07:25:36 CET 2024

Total time taken to generate the page: 0.01689 seconds