Print Page | Close Window

Troubles with CXTPReportControlLocale::RefreshActi

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5902
Printed Date: 22 November 2024 at 3:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Troubles with CXTPReportControlLocale::RefreshActi
Posted By: mgampi
Subject: Troubles with CXTPReportControlLocale::RefreshActi
Date Posted: 23 December 2006 at 6:12pm
Hi;
 
after migrating to toolkit version 10.4 we got troubles with all of our language independant conversion functions. After a few minutes of debugging I found out that the CXTPReportControl ctor calls CXTPReportControlLocale::RefreshActiveLCID(); that further calls _tsetlocale() with the currently selected user locales.
 
This breaks most of our existing formatting and conversion code because the code depends on "C" locale.
 
Is it possible to change and/or switch off this - unwanted - behaviour without creating a bunch of new classes?
 
Thanks in advance
 
Martin



Replies:
Posted By: sserge
Date Posted: 25 December 2006 at 7:41am
Hi,

Well, agree that this is a problem -- we'll remove _tsetlocale calls for future versions and correct all the related code.

To avoid a problem for now, you can simply comment the body of RefreshActiveLCID() and rebuild the toolkit.

--
WBR,
Serge


Posted By: mgampi
Date Posted: 28 December 2006 at 6:46am
Hi Serge;
 
Does this change have any adverse effect on existing code? Where, what??


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: sserge
Date Posted: 29 December 2006 at 4:10am
Hi,

_tsetlocale() was used to set locale other than English for date/time formating (COleDateTime::Format).
 
You can easily avoid this by overriding some methods like GetCaption().
 
_tsetlocale() call was actually added as an improvement, but unfortunately it appeared to raise the issue instead.

It is safe to comment it.
 
For future versions we'll use another localized formating methods instead of _tsetlocale and COleDateTime::Format.

--
WBR,
Serge


Posted By: mgampi
Date Posted: 29 December 2006 at 4:14am
Hi Serge,
Thanks for your comments!
BTW I like the toolkit and its stability...


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net