String Length

Started by jb, April 14, 2008, 06:59:08 AM

Previous topic - Next topic

jb

ListBox control: there appears to be a limit to the length of a string that can be returned with dcl_ListBox_Gettext.  I have a keynoting routine and if the string is longer than 208 characters the form freezes.  I'm having a hard time running this one down.  Any thoughts or known limitations with String Length and OpenDCL?

4.1.2.1
Architecture 2006, 2008
WinXP Pro

Thanks
James Buzbee
Managing Memeber
Black Horse Development, LLC

owenwengerd

I just did a quick test with a 300 character string, and it was returned without error.

jb

Well I found it.  If the EventInvoke property is set to 1 - Allow, the text string is limited, if 0 - Keep Focus, no limitation.  Strange.
James Buzbee
Managing Memeber
Black Horse Development, LLC

owenwengerd

This problem is due to a 256 character string length limit when passing strings to the AutoCAD command line. In Alpha 13 I've added code to detect event handler calls that exceed 256 characters, and in that case it replaces the first (presumably very long) string with "<...>". This means that if your OnSelChanged event handler needs to handle very long strings as the currently selected text, it must get the string via (dcl_ListBox_GetText) instead of relying on the sSelText argument to the event handler function.

jb

James Buzbee
Managing Memeber
Black Horse Development, LLC