Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
CAsba
- Posts: 432
- Joined: Fri Sep 30, 2022 12:11 pm
Post
by CAsba » Thu Aug 01, 2024 12:06 pm
Hi,
Using this code
Code: Select all
lock screen
send "mouseup" to btn "inputdg3"
unlock screen
show widget "spinner"
send "mouseup" to btn "setDG "
send "mouseup" to btn "listanother" of cd "manage products"
The widget shows, but does not 'spin'.
This in the IDE, haven't tried in standalone.
Any ideas ?
-
richmond62
- Livecode Opensource Backer

- Posts: 10097
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Thu Aug 01, 2024 12:40 pm
Here's something "babyish" made with LC 8.2 DP 2 (because I happen to be in front of a machine running MacOS 10.7.5 today).
-
-
Button code:
Code: Select all
on mouseUp
if the vis of widget "Spinner" is true then
set the vis of widget "Spinner" to false
set the label of me to "SHOW"
else
set the vis of widget "Spinner" to true
set the label of me to "HIDE"
end if
end mouseUp
Give it a whirl: if it works on your machine it is your code: if it doesn't work then it must be something a bit wrong with your machine.
-
Attachments
-
- Spin Me.livecode.zip
- Stack.
- (940 Bytes) Downloaded 263 times
-
bn
- VIP Livecode Opensource Backer

- Posts: 4171
- Joined: Sun Jan 07, 2007 9:12 pm
Post
by bn » Thu Aug 01, 2024 2:40 pm
Hi Casba,
the widget spinner is not spinning while LC is executing. You can make it spin if you add
Code: Select all
wait 0 milliseconds with messages
occasiionally.
This script only shows that the widget spins during a lengthy script:
Code: Select all
on mouseUp
repeat with i = 1 to 100000000
put " fljlakjf lkasjd ölkajd lköas " into tTemp
if i mod 10000 is 0 then
wait 0 milliseconds with messages
end if
end repeat
beep
end mouseUp
If you wait too often it will slow down execution time too much, if only a couple of times spinner will advance only slowly.
Kind regards
Bernd
-
SWEdeAndy
- VIP Livecode Opensource Backer

- Posts: 324
- Joined: Sat Aug 16, 2008 9:48 am
-
Contact:
Post
by SWEdeAndy » Thu Aug 01, 2024 3:17 pm
I find the spinner widget rather useless, as it tends to freeze precisely when you want it to spin: during lockScreen or database fetches.
A good alternative is to use a browser widget spinner, which always spins:
https://wheninspace.com/browseranimation/
-
PaulDaMacMan
- Posts: 683
- Joined: Wed Apr 24, 2013 4:53 pm
-
Contact:
Post
by PaulDaMacMan » Mon Aug 12, 2024 10:40 pm
CAsba wrote: ↑Thu Aug 01, 2024 12:06 pm
The widget shows, but does not 'spin'.
This in the IDE, haven't tried in standalone.
Any ideas ?
Could it be that this Spinner Widget does not spin only when the IDE is in 'Edit Mode'? Does it spin if you're on the Browser Tool?
I believe Widget OnTimer is execution context sensitive, I don't think it runs when the IDE is in Edit Mode.
-
stam
- Posts: 3070
- Joined: Sun Jun 04, 2006 9:39 pm
Post
by stam » Tue Aug 13, 2024 7:50 pm
yeah, it spins for me during long pulls with blocking code - but only in browse tool, not pointer tool (ie when running, not editing, the stack).