Widget Spinner

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Widget Spinner

Post by jwtea » Tue May 22, 2018 4:09 am

Hello , i trying to figure out how to use the widget "spinner".

As in one of my card there is a lot of information to load, so i thinking if how i can use the widget spinner to make it appear to prevent user thinking my app had hanged while making the card to load the information before going in ~ ~

Example;
Scene 1 : User press this button
Scene 2: Widget spinner appear and spinning
Scene 3: Go to the card with all the information loaded.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Widget Spinner

Post by Klaus » Tue May 22, 2018 1:42 pm

Hi jwtea,

do you mean something like this:

Code: Select all

on mouseup
  show widget "your spinner here"
  ## do your loading stuff here...
  ## and here...
  
  hide widget "your spinner here"
  go cd "all infos loaded"
end mouseup
?

Best

Klaus

jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Re: Widget Spinner

Post by jwtea » Wed May 23, 2018 4:50 am

Hello Klaus,

Unfortunately no ~ ~ :|

In my card script, i got a lot of script going on in the preopencard function ~ ~

I wanted to let the preopencard function to run finish before going in the card therefore meanwhile while waiting for the preopencard function , a spinner will appear and spinning ~ ~

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Widget Spinner

Post by MaxV » Wed May 23, 2018 12:59 pm

Klaus wrote:
Tue May 22, 2018 1:42 pm
Hi jwtea,

do you mean something like this:

Code: Select all

on mouseup
  show widget "your spinner here"
  ## do your loading stuff here...
  ## and here...
  
  hide widget "your spinner here"
  go cd "all infos loaded"
end mouseup
?

Best

Klaus
Hi Klause,
does you code work?
I tried, but I get a fixed spinner showing and hiding. It doesn't spin.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Simon Knight
Posts: 854
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Widget Spinner

Post by Simon Knight » Wed May 23, 2018 1:12 pm

Hi,

I have a similar problem in that my spinner appears and never updates (spins). I don't think its the widget it just that Livecode is to busy doing the other stuff. In my case its loading and resizing image files. I have tried putting a number of "wait with messages" but it will not spin even with a wait of three seconds. The best I came up with was changing the cursor to busy, this does update a little with a 300ms "wait with messages".
best wishes
Skids

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Widget Spinner

Post by Klaus » Wed May 23, 2018 3:12 pm

Hi Max,
MaxV wrote:
Wed May 23, 2018 12:59 pm
Hi Klause,
is it really that hard to transcribe a (not so) unknown FIVE Letter name? :(
MaxV wrote:
Wed May 23, 2018 12:59 pm
does you code work?I tried, but I get a fixed spinner showing and hiding. It doesn't spin.
Lets say: it SHOULD work!
I guess Simon is right and this is just like with animated gifs, they will also halt if LC is doing lots of computing stuff.

Best

Klaus

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Widget Spinner

Post by MaxV » Thu May 24, 2018 2:43 pm

Klaus wrote:
Wed May 23, 2018 3:12 pm
Hi Max,
MaxV wrote:
Wed May 23, 2018 12:59 pm
Hi Klause,
is it really that hard to transcribe a (not so) unknown FIVE Letter name? :(
:lol: Sorry, my fault. For Italians you name is a mess to type. It's totally unnatural because we don't use K and the "laus" is very unorthodox coupling of vocals... and so my hands added a "e" automatically. Do you mind if I call you "Nicola"? :lol: :lol: :lol:
aus dem freundlichen viertel Maximillian
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Widget Spinner

Post by MaxV » Thu May 24, 2018 2:49 pm

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Widget Spinner

Post by Klaus » Thu May 24, 2018 2:50 pm

MaxV wrote:
Thu May 24, 2018 2:43 pm
Do you mind if I call you "Nicola"?
YES! :D

You can call me Claudio (Maggiore) if you really can't spell Klaus! 8)

Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 365
Joined: Mon Jun 10, 2013 1:32 pm

Re: Widget Spinner

Post by Lagi Pittas » Thu May 24, 2018 4:35 pm

I Think we should call you Santa Klaus because you keep giving ....

Lagi

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Widget Spinner

Post by bogs » Thu May 24, 2018 7:23 pm

That is two in favor of my favorite nickname for Klaus, now we just change your nationality to Dutch and we're all set :wink:
Image

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Widget Spinner

Post by SparkOut » Thu May 24, 2018 7:31 pm

Eho is Klaus? You mean Klausimausi? Aha!

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Widget Spinner

Post by bogs » Thu May 24, 2018 8:35 pm

SparkOut wrote:
Thu May 24, 2018 7:31 pm
Klausimausi
I like that one too, I'm flexible. Of course, the most often mangled spelling appears to be "Kalus", but I don't think that one has any flair :twisted:
Image

Post Reply

Return to “Talking LiveCode”