TextField inconsistency

Hello.

I don’t know if this has been reported before.

Consider a text field (‘txt’) and then txt.text = “some words.” If one has LimitText set to, say, 7. On the Mac the field will contain “some words,” but on Windows it will contain “some wo.” That is, when one sets the text in code in Windows it respects the LimitText value; on the Mac it does not.

One could probably make up stories arguing for each approach. Whatever way is chosen, it would be good if it worked the same way everywhere.

2014R3.1

-Bob Gordon

That certainly sounds like a bug.

The docs say: LimitText works for normal text entry, copy and paste, and drag and drop.
It doesn’t mention setting the text programmatically.

[quote=172365:@Bob Gordon]Hello.

I don’t know if this has been reported before.

Consider a text field (‘txt’) and then txt.text = “some words.” If one has LimitText set to, say, 7. On the Mac the field will contain “some words,” but on Windows it will contain “some wo.” That is, when one sets the text in code in Windows it respects the LimitText value; on the Mac it does not.[/quote]

LimitText is valid only for keyboard entries.

Based on the above comments… it still sounds like it is a bug… the question is… an OSX bug? or a WIN bug?

Looks more like a Xojo bug. Windows Limitext is not supposed to be applied to text set in code, or to text already present when LimiText is set. See https://msdn.microsoft.com/en-us/library/95zx4bc4.aspx

For some reason, Xojo applies limittext to the property when it should apply it to keyboard entries, like in Mac OS X.

Thats what I meant… was the bug in the Windows or OSX implementation… not the OS… sorry for the confusion :slight_smile:

Could have been the OS. I have been suffering through a Windows program for a week, and there are indeed many limitations that do not manifest in Mac OS X. It is difficult to obtain the same smoothness in Windows as in Mac OS X.