UIField.inspt cannot be set?

Discuss OrbForms Designer and PocketC Architect

Postby design4use on Fri Oct 11, 2002 4:54 am

Anybody whether it is impossible for some reason to set the insertion point in a UIField e.g. via
UIField.inspt = 20;
where 20 in this example is somewhere inside some text in the field. When I try to set inspt and then to insert some text at that position, it always stays at the same value, which is after the last char of the text of the field.
Anybody experienced this before?
[fyi - the text that was in the field before was set programatically if that makes any difference]

any and all help is much appreciated,
Posts: 128
Joined: Fri May 10, 2002 3:31 pm

Postby samps on Fri Oct 11, 2002 6:41 am

It works fine. You must be on the wrong track in some way or another.

Quick testcase:

handler mainForm.onopen() {

handler button102.onselect() {

The field displays Original when the form opens. The first insertion fails because there is no such thing as the fifteenth characer in the field, so it puts 5 1's immidiately after 'Original', to display Original11111.

The next insertion works as intended, because now the field has programmatically gotten enough characters for inspt=9 to make sense, and the field now displays Original1222221111.

Are you sure that your insertion point is set to a value that is within the length of the field? Is the filed capped in length by Maax Characters?

Ubuntu user #82
Posts: 143
Joined: Tue Feb 20, 2001 12:33 am
Location: Australia

Postby design4use on Fri Oct 11, 2002 3:42 pm

finally found the problem:
I was accidentally adding an integer to a string when computing the inspt, so instead of 5 + 4 (which is 9) I got "5" + 4 which ended up being "54". Never mind and thanks for the test case. Sleep is a good thing every once in awhile.
Posts: 128
Joined: Fri May 10, 2002 3:31 pm

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest