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 » Developing U++ » UppHub » LED Ctrl (for characters and numbers)
Re: LED Ctrl (for characters and numbers) [message #27755 is a reply to message #27727] Sun, 01 August 2010 23:18 Go to previous message
koldo is currently offline  koldo
Messages: 3437
Registered: August 2008
Senior Veteran
Hello cb31_fr

It is now added in Bazaar.

I have done some changes relating with this:

Before
	MyLED = new LEDCtrl( "<>@^&~\"{A¨\\'Z`(E#|_R)\"N°Y}=!-+*/0:12.3[45],;?%", 3, White, Blue ) ;
	MyLED->SetBgColor( LtBlue ) ;


After
	MyLED.SetString("<>@^&~\"{A¨\\'Z`(E#|_R)\"N°Y}=!-+*/0:12.3[45],;?%")
		 .SetLEDSize(3).SetFgLightOnColor(White).SetFgLightOffColor(Blue).SetBgColor(LtBlue);


I have removed the "new" in code. The U++ coding style is protective so recommends not to use new or malloc. Because of it it is not possible to initialize a Ctrl in the constructor, so I have added some functions to do it after.

The advantage of it is that you will not see heap leaks.

Please check the code. The changes have been light so the order of function calls could change the result.

Thank you very much Smile. Please improve it as many times as you like.

Included in Bazaar table too here http://www.ultimatepp.org/www$uppweb$bazaar$en-us.html (on Monday).


Best regards
Iñaki

[Updated on: Sun, 01 August 2010 23:26]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: NEW: PortQueue (M$ CCR port to u++)
Next Topic: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
Goto Forum:
  


Current Time: Sat Jul 19 11:07:27 CEST 2025

Total time taken to generate the page: 0.04179 seconds