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 » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl sorting and segfaults
Re: GridCtrl sorting and segfaults [message #16675 is a reply to message #16669] Mon, 07 July 2008 12:27 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1231
Registered: August 2007
Senior Contributor
Quote:


When I do not use debug mode, I get crash at LanguageInfo::Compare(WString,WString) (which I hacked by converting to String and doing strcmp) when I click GridCtrl header to sort a column containing c-strings (char *).



Why did you hack it? There are other solutions.

LanguageInfo::Compare(String a, String b)
LanguageInfo::Compare(WString a, WString b)
LanguageInfo::Compare(const char *a, const char *b);
LanguageInfo::Compare(const wchar *a, const wchar *b);
LanguageInfo::Compare(const wchar *a, const wchar *b, int a_length, int b_length)


Also, you can convert a String to WString using (and vice versa);

 Upp::String   WString.ToString();
 WString       String.ToWString();



[Updated on: Mon, 07 July 2008 12:28]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GridCtrl - copy all [Feature Request]
Next Topic: ArrayCtrl: is it possible to customize the deletion message?
Goto Forum:
  


Current Time: Tue Sep 16 12:47:03 CEST 2025

Total time taken to generate the page: 0.66037 seconds