Author Topic: wxCHECK_VERSION vs wxVERSION_NUMBER  (Read 8369 times)

lonesock

  • Guest
wxCHECK_VERSION vs wxVERSION_NUMBER
« on: October 27, 2005, 03:59:34 am »
Hi, All.

I've been using Code::Blocks for a while now and am extremely impressed...thanks.  So I started using the CVS version to keep up to date, but I'm still using wx version 2.4.2.  A few days ago I had something break in sdk\cbthreadpool.cpp.  The offending section was:

#if wxCHECK_VERSION(2,6,0)
    wxMilliSleep(1);
#else
    wxUSleep(1);
#endif

when I checked through the code I found something similar and used this instead:

#if wxVERSION_NUMBER < 2500
   wxUsleep(1);
#else
   wxMilliSleep(1);
#endif

and now it works just great.  I keep checking the CVS version, but it hasn't been changed as of now, so I thought I'd mention it.

Great work, everybody.

Jonathan

[edit] using MinGW 3.2.3 & 3.4 on Win2K and XP (and I have it working on Ubuntu! but haven't updated it in a while) [/edit]
« Last Edit: October 27, 2005, 04:02:21 am by lonesock »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #1 on: October 27, 2005, 09:20:23 am »
Updated in cvs. Thanks for pointing out.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #2 on: October 27, 2005, 09:41:34 am »
But the problem wasn't with wxCHECK_VERSION, but rather with wxUSleep and it was fixed (i.e. changed to wxUsleep) a few hours later.
 :shock:
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #3 on: October 27, 2005, 09:54:51 am »
Lonesock was right, though. I did a fresh checkout of HEAD and indeed, it still had wxUSleep.

Funnily, my commit does not show in viewcvs, either. If you check out, you get the correct version, though.
Does viewcvs have a delay of a couple of hours, maybe?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #4 on: October 27, 2005, 11:19:24 am »
Funnily, my commit does not show in viewcvs, either. If you check out, you get the correct version, though.
Does viewcvs have a delay of a couple of hours, maybe?

Viewcvs uses anonymous cvs to access the repository, so it bears the anon-cvs lag (4-6 hours)...
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #5 on: October 27, 2005, 12:05:02 pm »
Woah... if you commit with svn at BerliOS, you see your changes in WebSVN the next second  :shock:

What a shame SF uses cvs ;)  Όπως έστρωσες θα κοιμηθείς  :P
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

takeshimiya

  • Guest
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #6 on: October 27, 2005, 07:13:36 pm »
I don't think CVS is at fault, but sf.net services I suppose.

Offline TheTuxKeeper

  • Regular
  • ***
  • Posts: 293
  • daniel2000
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #7 on: November 04, 2005, 03:19:20 pm »
This wxUSleep/wxUsleep typo is also in the RC2 sources, what makes it more difficult to build on Linux with wxGTK < 2.6.0 (for example fedora).

Is this a big enough bug to release a RC2-1 ?
That's only a thought.

Daniel
Nightly builds for openSUSE

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wxCHECK_VERSION vs wxVERSION_NUMBER
« Reply #8 on: November 04, 2005, 03:49:25 pm »
An update to RC2 will be released. We 're just ironing out some bugs...
Be patient!
This bug will be fixed soon...