Author Topic: wxLED, which version with C::B13?  (Read 4509 times)

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
wxLED, which version with C::B13?
« on: January 28, 2014, 09:56:53 am »
Hello,

I recently switched from C::B 12.11 to V13.12. Now my wxLED items stopped working. Code::Blocks generates the following code:
Code
    Alarm1 = new wxLed(PageDiag,ID_LED1,,,,wxDefaultPosition,wxDefaultSize);
    Alarm1->SwitchOff();

I noticed that the interface for the wxLED somehow changed. The old version used Enable() to switch the LED on and off. The new version uses dedicated SwitchOn/Off() functions. So my led.h/cpp seems to be outdated. Where can I get the current version? C::B Help-About says it was built using wx2.8.12. Is this correct? I use wx2.9.4 which doesn't include the contrib item sources. I searched the web but "wxLED" or "wxWidgets contrib items" gives only the outdated results I already have.

Anyway, regardless of the version "new wxLed(PageDiag,ID_LED1,,,,wxDefaultPosition,wxDefaultSize);" is no valid C syntax. What can I do to fill the gaps?

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: wxLED, which version with C::B13?
« Reply #1 on: January 28, 2014, 12:04:38 pm »
Wow,this was a hard one:
http://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/wxContribItems/wxled/led/include/wx/led.h
or
svn://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/wxContribItems/wxled/led/include/wx/led.h

Either I'm too stupid or there is really no search function and you have to browse the directory tree and guess which way to go at each branch. :(

I think the best way to stop users from asking dump questions is to make the source code of the contrib items available for download somewhere we have a chance to find it. Not all programmers using wxsmith want to download the full C::B source or are familiar with SVN (I'm not, as you can see).

Offline benezan

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: wxLED, which version with C::B13?
« Reply #2 on: January 28, 2014, 12:33:27 pm »
Ok, the empty creator parameter list problem was fixed by deleting and re-inserting the leds. It seems that wxsmith doesn't like the color entries set to "default" in the attributes tab. It also seems that you have to check the "fixed min size" box. Otherwise the LED is invisible.

Hope this helps if somebody happens to have the same problems.