topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday April 15, 2024, 11:23 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Button pos and floating point error  (Read 7741 times)

xerces8

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Button pos and floating point error
« on: September 19, 2008, 09:00 AM »
Hi!

I just downloaded Screenshot Captor 2.41.01

Looks great, but some bugs sneaked in:

 - (I started it from the extracted ZIP, without running the installer) after entering the licence code, I get this dialog: (see attached image)

 - after running it from the USB stick on another PC (Windows 2000) I got this error right after start: (see second image)
After that it works just fine.

Regards,
David

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Button pos and floating point error
« Reply #1 on: September 19, 2008, 09:43 AM »
xerces8: my guess is that the two PCs run different locales?

C++ Builder has this wonderful idea of using the locale's thousands-separator when saving values... which works super nicely when moving from a locale that uses '.' separator to a locale that uses ',' :-)

The first problem (button position) is probably on a machine that is configured to use 120-DPI Display size instead of the normal 96-DPI size. A lot of applications don't handle this properly.
- carpe noctem

xerces8

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Button pos and floating point error
« Reply #2 on: September 19, 2008, 10:26 AM »
Yep, the first PC uses "," and the second uses "." for decimal.

Actually the most programs handle 120DPI well (otherwise I would go crazy)  ;)

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Button pos and floating point error
« Reply #3 on: September 19, 2008, 10:32 AM »
A solution would be manually editing the .ini file and swapping ','<->'.' when moving between computers. Tedious, but it's going to work.
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Button pos and floating point error
« Reply #4 on: September 19, 2008, 11:45 AM »
f0dder is right about the cause.
another solution is to just delete the ini settings file.

i can fix this problem in future versions -- xerces8 can you mail me your ini file so i can help test a solution? ([email protected])


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Button pos and floating point error
« Reply #5 on: September 19, 2008, 11:49 AM »
mouser: is it possible to hardcore to always use one local for the decimals separator in the ini files? Or perhaps move to a completely different ini-filer handler?
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Button pos and floating point error
« Reply #6 on: September 19, 2008, 03:43 PM »
it is possible to force this yes. i thought i already did recently in fact in SC.  Either i didn't or xerces had an older ini file.

xerces8

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Button pos and floating point error
« Reply #7 on: September 20, 2008, 11:08 AM »
No, I had a fresh installation.