Sg2.9
Text Input
Recent RSS
Text Input
Date:  27. April 2010, 17:49

How would I go about if I wanted to make a textfield in a dialogbox.
So far I have:

var dataWindow = new TextEdit(dialog, 'multiline') {
bounds: [0, 12, 200, 115],
text: h
};

That works ok if I make the string in the script editor. But if I want to delete the current text (string h) and paste text (or numbers to be precise) I can only type/paste in so many letters/numbers. Is this because there is a limited number of allowed characters in a string or what is it?

Say I wanted to paste a text containing 30.000 charaters. How would I do that?

Thanks

Re: Text Input
From:  Jürg Lehni
Date:  28. April 2010, 13:31

Hi Håkan,

We discourage using the UI package classes for making GUIs as it will have to go away in CS6, due to upcoming changes in Adobe Illustrator. The news post Version 2.7.037 Is Here explains which ways of making UI will still be supported on CS6 and beyond.

But to answer your question, you can se the textEdit.maxLength property to a maximum of 32767 (2 ^ 16 - 1). This is a limitation of ADM.

I hope this helps?

Re: Text Input
Date:  29. April 2010, 00:35

Ok, I see.
So if I change the dialog to a palette instead how could I set the maximum number of letters there?

Re: Text Input
From:  Jürg Lehni
Date:  2. May 2010, 14:12

That's a good question - at the moment you cannot. But I am about to improve the Palette code to allow far more things like updating displayed values, disabling / enabling components and more component types (e.g. font, label, and rows of buttons). I will also integrate this then, and make all TextEdit items default to the maximum allowed text.

Re: Text Input
From:  Jürg Lehni
Date:  5. May 2010, 22:47

This is all implemented now. Expect an update with lots of nice new Palette features very soon:

https://dev.scriptographer.org/changeset/1437

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Hexagonal Grid Generator 16.11.11