Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » How to do fast Append & scroll in LineEdit with MT?
How to do fast Append & scroll in LineEdit with MT? [message #45646] Fri, 18 December 2015 14:58 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Hi!

I have this program that runs other tasks using LocalProcess. The execution can take sometime a lot of time, and can even hang, so I decided to try MT. I used the callback posting mechanism to post a callback to the application with a new output fragment. And I'm using a LineEdit to show the output as it is created.

I saw no obvious way of inserting something to the end of the text in the LineEdit, so I used edit.Set(edit.Get() + t). This was really slow and unresponsive. Now I'm trying to use Insert and some sort of a position returned by LineEdit. But the position system that this control uses isn't the most intuitive and I always had to use a lot of trial and error to get it right. Using Append now is much more responsive (still not enough, I probably need to update it only every 1K of output or something), but the output is mangled, which makes me believe that I am using a wrong position as a parameter to Insert.

So my question is: how to easily and efficiently append something to LineEdit in a MT environment. And should I use GUI lock instead of post-backs?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What do you think about this approach to making CodeEditor more user extendable?
Next Topic: NotNull can be fooled
Goto Forum:
  


Current Time: Fri Mar 29 03:13:27 CET 2024

Total time taken to generate the page: 0.01749 seconds