Hello,
I have a few textarea views where I want to save the current scroll position of.
I'm using a map together with file.writemap & file.readmap to read it back in.
Doing so I noticed the following issues...
1. restoring the position after setting the text doesn't work at all.
2. using callSubDelayed to a sub where it sets the position makes the text jump a few pixels only
3. using a 1 second timer to restore the position works fine.
4. using a sleep(100) after setting the text also seems to be a way to bypass the problem.
Does this mean that the textarea.text is running async?
And is there a way to use wait for for this as the sleep method is a gamble as one would pick the lowest working value that might bug again on a slower machine?
I have a few textarea views where I want to save the current scroll position of.
I'm using a map together with file.writemap & file.readmap to read it back in.
Doing so I noticed the following issues...
1. restoring the position after setting the text doesn't work at all.
2. using callSubDelayed to a sub where it sets the position makes the text jump a few pixels only
3. using a 1 second timer to restore the position works fine.
4. using a sleep(100) after setting the text also seems to be a way to bypass the problem.
Does this mean that the textarea.text is running async?
And is there a way to use wait for for this as the sleep method is a gamble as one would pick the lowest working value that might bug again on a slower machine?