A while back I created a Spinner standalone that listened for messages via sockets. It worked quite well actually. I sent it commands to show and hide itself, and start and stop the spinner, as well as text to display. Since it was a standalone app it was not subject to the inline message queue.
Bob S > On Dec 20, 2022, at 10:35 , jbv via use-livecode > <use-livecode@lists.runrev.com> wrote: > > Thanks for the offer, but actually things are a bit more complicated > and include several steps : > 1- the user selects different options on a modal stack > 2- the user clicks a "search" button > 3- various calculations are made client side according to the selections > and some data already in the main stack behind the modal one > 4- a request is sent to a distant mySQL to retrieve text in a DB > 5- data is sent back to the client (by chunks of 500 lines) and is > dispatched in different fields in the main stack > 6- 1 field that contains the main text data has textstyle & textcolor > modified line by line and often several words can be modified in the > same line. > > The whole process is quite fast, especially when using "lock screen" > for steps 3 and 6, but depending on the user"s selection and the > content of the DB, it can take 3 to 8 seconds at times. > And what I was looking for was a spinning gif throughout the whole > process from step 1 to step 6. > Unfortunately it stops spinning during steps 3 and 6 when using > "lock screen", which isn't very elegant. > > Finally I replaced the gif with a progress bar which updates every > 25 lines during step 6 (when more than 100 lines are returned) and > it's ok, since it allows me to use "lock screen". > > Le 2022-12-20 12:31, Richard Gaskin via use-livecode a écrit : >> How many chars in the text? >> I'd wager that unless it's uncommonly enormous, you may find that the >> one-time cost of writing a handler to use the styledText array of the >> field will speed things up so much you may not even need anything more >> than a brief watch cursor. >> If you can post a sample project with text of similar length we may >> have another good opportunity like the many forum threads we've seen >> where long processes become brief blips with iterations from the >> community. >> -- >> Richard Gaskin >> Fourth World Systems >> jbv wrote: >>> Le 2022-12-20 08:19, Brian Milby via use-livecode a écrit : >>>> Could you make changes to htmlText in a variable and then assign all >>>> at once back to the field? >>> I thought of that, but it makes other parts of the script more complicated. >>> Finally I will chose a different strategy : instead of an animated gif, I'm >>> gonna use a progress bar that will be updated every 10 lines... >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode