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 » LineEdit, EditFields, DocEdit » BUG?: EditString Text rendering not stable with some Strings
BUG?: EditString Text rendering not stable with some Strings [message #37432] Wed, 03 October 2012 21:52 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Supplying a String like

String s = "ab";
s.Cat('\0');
edstring.SetData(s);


will cause a rendering problem..
I know, a String should be terminated by one '\0' only, but some times preinit sized buffers (String) will be supplied, that have more 0000 following. How is EditString supposed to deal with this?

cheers..

PS: i could find the cause though..
Re: BUG?: EditString Text rendering not stable with some Strings [message #37436 is a reply to message #37432] Thu, 04 October 2012 21:36 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Wed, 03 October 2012 15:52

Supplying a String like

String s = "ab";
s.Cat('\0');
edstring.SetData(s);


will cause a rendering problem..
I know, a String should be terminated by one '\0' only, but some times preinit sized buffers (String) will be supplied, that have more 0000 following. How is EditString supposed to deal with this?



Actually, I do not know... Smile

Should we treat it as normal unicode character and display something like box? Or should we change the len of string?

Mirek
Re: BUG?: EditString Text rendering not stable with some Strings [message #37437 is a reply to message #37436] Thu, 04 October 2012 21:49 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
we could stick to the printf rule, the first '\0' is the limiter, no matter how much more there might be..

i dont see any useful case to display things past the '\0' of a string in an EditString..Do you?

What do you mean by changeing len of string? actively editing the String? or simply adjusting the displayed len?

Re: BUG?: EditString Text rendering not stable with some Strings [message #37438 is a reply to message #37437] Thu, 04 October 2012 21:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Thu, 04 October 2012 15:49

we could stick to the printf rule, the first '\0' is the limiter, no matter how much more there might be..

i dont see any useful case to display things past the '\0' of a string in an EditString..Do you?

What do you mean by changeing len of string? actively editing the String? or simply adjusting the displayed len?




Well, String in U++ is defined as something that actually CAN contain zero characters. So if you are sending something like this into EditString, you sort of expect that these zeroes are editable (say that at least you can see them and delete them).

In fact, in e.g. LineEdit, this is even desired behaviour - you can then edit some "wrong" files and delete the garbage out or something like that. If LineEdit should support this, EditString should behave consistently, correct?

Re: BUG?: EditString Text rendering not stable with some Strings [message #37439 is a reply to message #37438] Thu, 04 October 2012 21:56 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
you are right here Smile

vote for that too..

important is to have a stable behaviour

could you fix that? i couldnt find the spot (long time not dealing with upp now, but always love to come back)

cheers
Re: BUG?: EditString Text rendering not stable with some Strings [message #37456 is a reply to message #37439] Mon, 08 October 2012 10:33 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Thu, 04 October 2012 15:56

you are right here Smile

vote for that too..

important is to have a stable behaviour

could you fix that? i couldnt find the spot (long time not dealing with upp now, but always love to come back)

cheers


Fixed.

Mirek
Previous Topic: DocEdit code scrolling
Next Topic: Custom check for EditIntXxxx controls
Goto Forum:
  


Current Time: Thu Mar 28 23:12:38 CET 2024

Total time taken to generate the page: 0.01737 seconds