Can has Answer/Ask -like progress bar?
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Can has Answer/Ask -like progress bar?
I think it's long past time there's some sort of universal abstraction for a 'progress bar display window', and in a way similar to Answer/Ask that gets special treatment like being auto added to standalones that have script(s) that call for those.
What has me thinking about this again is that I find myself in 2024 STILL using the old 'set cursor to busy' repeatedly within scripts whenever I want the user (me usually) to know that a script is still processing (vs. engine being locked up or script is in an infinite repeat loop with Lock Screen and Messages locked). It's a quick and dirty thing to copy-paste a few of those into a repeat loop, and I always say that I'll go back later and replace it with something nice looking but rarely get around to it.
Back in the Hypercard days there was a plethora of progressbar externals that could be simply be copied into a stack to replace the quick and dirty 'set cursor to busy' cursor animation with something standard or in a slightly more more-modern UIs (mac 'Platinum' OS 8 / 9 / Carbon in the late 90s). The black and white cursor animation looks soooooo HC 1980s, but at least you can't confuse it with the OS's application locked-up 'spinning beachball' cursor, lol. But if we had a standard progress windoid stack we could call on, update, and close from our scripts and have some guarantee that it the stack would be there (and hopefully kept up to date with the latest UI trends, like the 'Knight-Rider Progress' in newer macOS), and be auto included when we export, well then maybe I wouldn't need to still be using the same quick & easy line that I used for this purpose in HC 1.x, circa 1987!
I don't think it needs to be anything fancy, but calling this Progress windoid would need to have a least 3 parameters:
'Progress Text', 'Percentage Compete' (perhaps mapped to 'thumbPosition' property), and optional 'Cancel Button Label' params.
Does anyone have such a thing made up already that they use regularly that they'd like to put forward? I think I've made one (or two) up myself at some points over the years, probably as sub-stacks in stacks that I've forgotten about.
What has me thinking about this again is that I find myself in 2024 STILL using the old 'set cursor to busy' repeatedly within scripts whenever I want the user (me usually) to know that a script is still processing (vs. engine being locked up or script is in an infinite repeat loop with Lock Screen and Messages locked). It's a quick and dirty thing to copy-paste a few of those into a repeat loop, and I always say that I'll go back later and replace it with something nice looking but rarely get around to it.
Back in the Hypercard days there was a plethora of progressbar externals that could be simply be copied into a stack to replace the quick and dirty 'set cursor to busy' cursor animation with something standard or in a slightly more more-modern UIs (mac 'Platinum' OS 8 / 9 / Carbon in the late 90s). The black and white cursor animation looks soooooo HC 1980s, but at least you can't confuse it with the OS's application locked-up 'spinning beachball' cursor, lol. But if we had a standard progress windoid stack we could call on, update, and close from our scripts and have some guarantee that it the stack would be there (and hopefully kept up to date with the latest UI trends, like the 'Knight-Rider Progress' in newer macOS), and be auto included when we export, well then maybe I wouldn't need to still be using the same quick & easy line that I used for this purpose in HC 1.x, circa 1987!
I don't think it needs to be anything fancy, but calling this Progress windoid would need to have a least 3 parameters:
'Progress Text', 'Percentage Compete' (perhaps mapped to 'thumbPosition' property), and optional 'Cancel Button Label' params.
Does anyone have such a thing made up already that they use regularly that they'd like to put forward? I think I've made one (or two) up myself at some points over the years, probably as sub-stacks in stacks that I've forgotten about.
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
Here's something I made earlier (2010) which is NOT what you want, BUT might serve as a jumping off thing:
- -
Obviously you'll have to hack the script to blazes.
If some clever person could wiggle that into a widget . . .
Or, being cruder, set it up as a substack of the mainstack that shows up as a modeless window (also has the advantage of blocking access to the mainstack).
- -
Obviously you'll have to hack the script to blazes.
If some clever person could wiggle that into a widget . . .
Or, being cruder, set it up as a substack of the mainstack that shows up as a modeless window (also has the advantage of blocking access to the mainstack).
- Attachments
-
- PROGRESS.livecode.zip
- (2.13 KiB) Downloaded 8 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
Here's something slightly better insofar as the progress bar is a modeless substack:
-
-
- Attachments
-
- PBDEMO.oxtstack.zip
- (2.39 KiB) Downloaded 5 times
https://richmondmathewson.owlstown.net/
-
- Posts: 285
- Joined: Thu Sep 16, 2021 1:40 pm
- Contact:
Re: Can has Answer/Ask -like progress bar?
Windows system loading progress is a font.
Click the character map tab and scroll way down to see the characters it uses for the spinner.
Could make or use something like this which gets included in the build process.
Can you set the cursor to a font?
A script that exports a snapshot from the rect of a graphic that's been set to a character of a font could do the trick.
If the cursor is what you want to do.
Where is 'busy' defined? Being able to overwrite that would be useful.
Click the character map tab and scroll way down to see the characters it uses for the spinner.
Could make or use something like this which gets included in the build process.
Can you set the cursor to a font?
A script that exports a snapshot from the rect of a graphic that's been set to a character of a font could do the trick.
If the cursor is what you want to do.
Where is 'busy' defined? Being able to overwrite that would be useful.
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
That's entirely possible.see the characters it uses for the spinner
But what is being looked for is some sort of progress bar.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1538
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: Can has Answer/Ask -like progress bar?
'busy' is defined at engine level as an internal function.
It could be extended, given enough time and effort.
I'd like to have some built in dialog - rather than just ask / answer, have another called "notify"
This could not only handle UI hints like a spinner to let the user know things are still happening, but it might be good to have a unified way of supporting notification alerts within OXT too?
Just an idea.
I like the idea of setting the cursor to something other than the black and white spinner.
Perhaps (not this exact one) - which is only a quick grab from google search But having something like a revised and slightly more modern take on the black & white Classic-Mac-Style spinner would be good. It's easy to replace as although the function is inside the engine code, externally it's looking for cursor image resources you can change.
It's in the 'revCursors' stack, images named "c16" through to c23"
It could be extended, given enough time and effort.
I'd like to have some built in dialog - rather than just ask / answer, have another called "notify"
This could not only handle UI hints like a spinner to let the user know things are still happening, but it might be good to have a unified way of supporting notification alerts within OXT too?
Just an idea.
I like the idea of setting the cursor to something other than the black and white spinner.
Perhaps (not this exact one) - which is only a quick grab from google search But having something like a revised and slightly more modern take on the black & white Classic-Mac-Style spinner would be good. It's easy to replace as although the function is inside the engine code, externally it's looking for cursor image resources you can change.
It's in the 'revCursors' stack, images named "c16" through to c23"
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
That ring is certainly a lot betetr than the ancient BW thing. But you'll have to remove the "white fuzzies".
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1538
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: Can has Answer/Ask -like progress bar?
Yes, absolutely - like I say, not that one in particular. That was just grabbed from Google as a quick demo of what I mean.richmond62 wrote: ↑Tue Mar 26, 2024 2:24 pm That ring is certainly a lot betetr than the ancient BW thing. But you'll have to remove the "white fuzzies".
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
Mind you, that is NOT a progress bar.
My primitive 'thingy' is.
My primitive 'thingy' is.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
Here's a place worth poking about in a bit:
https://web.archive.org/web/20100906224 ... downloads/
-
https://web.archive.org/web/20100906224 ... downloads/
-
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
Ever so slightly childish fun:
-
-
- Attachments
-
- proGBAR.oxtstack.zip
- (2.36 KiB) Downloaded 6 times
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Can has Answer/Ask -like progress bar?
Replacing the black and white cursor to something that looks newer than 1980s would be great too, I believe all modern operating systems now support larger cursors and color cursors.
But I meant the sort of modal or modeless window that Richmond posting. If something like that was always available to the IDE like Ask/Answer and it was easy to call with some simple syntax then I'd use that instead of a cursor animation. The reason I've use 'set cursor to busy' a lot is purely due to convenience. Plus it seems that all xTalks have supported that mechanism.
A 'notifications' window might be good too or maybe it could be the same stack you could use with or without an animated progress indicator (invisible when the 'progress' value is not set or set to empty).
The main thing is that it will always be available to our stacks when something like that suddenly becomes needed and this stack should maintain compatibility with the original syntax if there's any updates.
BTW, at one point I did actually make a version of 'Answer' stack that is square and has up to 4 buttons (stacked 1 column x 3 buttons down or 2 columns x 2 buttons each) just like newer versions of macOS have done with the system's 'Answer' dialog. I wanted it to check the OS version and then enabled that 'mode' for BigSur (macOS 11) +. I modeled it based on screenshots from BigSur as seen when doing things like emptying the trash can in the Finder. Although I think Apple has changed that again slightly since then. Matching an OS'es look is an forever moving target.
But I meant the sort of modal or modeless window that Richmond posting. If something like that was always available to the IDE like Ask/Answer and it was easy to call with some simple syntax then I'd use that instead of a cursor animation. The reason I've use 'set cursor to busy' a lot is purely due to convenience. Plus it seems that all xTalks have supported that mechanism.
A 'notifications' window might be good too or maybe it could be the same stack you could use with or without an animated progress indicator (invisible when the 'progress' value is not set or set to empty).
The main thing is that it will always be available to our stacks when something like that suddenly becomes needed and this stack should maintain compatibility with the original syntax if there's any updates.
BTW, at one point I did actually make a version of 'Answer' stack that is square and has up to 4 buttons (stacked 1 column x 3 buttons down or 2 columns x 2 buttons each) just like newer versions of macOS have done with the system's 'Answer' dialog. I wanted it to check the OS version and then enabled that 'mode' for BigSur (macOS 11) +. I modeled it based on screenshots from BigSur as seen when doing things like emptying the trash can in the Finder. Although I think Apple has changed that again slightly since then. Matching an OS'es look is an forever moving target.
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
cobbled together in a very simple way.But I meant the sort of modal or modeless window that Richmond
My first example (from 2010) is over complicated as it employs 4 images: one of which gets stretched, and a "frotn" that gets 'pushed' along in front of the stretched image.
The new one I made yesterday is far, far simpler insofar as it only uses 2 images: a background 'track' and an 'Aqua' progress bar that gets stretched.
Download the new stack and take it to pieces.
The snags about those rotary progress indicators are:
1. Chummy can see no end to the progress.
2. They either employ a GIF, or a multiplicity of frames.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
Damn: I knew I shouldn't have had that 13th cup of coffee:
- -
You can make your brain go funny WITHOUT the 'benefit' of coffee right here with "Uncle Richmond's" evil creation.
- -
You can make your brain go funny WITHOUT the 'benefit' of coffee right here with "Uncle Richmond's" evil creation.
- Attachments
-
- Brain Fudge.oxtstack.zip
- (2.75 MiB) Downloaded 8 times
https://richmondmathewson.owlstown.net/
-
- Posts: 285
- Joined: Thu Sep 16, 2021 1:40 pm
- Contact:
Re: Can has Answer/Ask -like progress bar?
can't you do:
ask and/or
Okay then
The overlay stack can't animate if the original stack is using repeat loops that block all other messages on account of no multi-threading...unless GIF maybe? Or some update_overlay_stack message of course.
ask and/or
oh you can't. Weird, always thought that was a thing.answer with stack "such and such?"
Okay then
works like the thing you are looking to accomplish, could even set the overlay stack to some transparency for that classic "Ha, I stopped you from using the interface and piling up errant messages while you wait!" look.popup stack "watch this paint dry while I process the data " at 0,0
The overlay stack can't animate if the original stack is using repeat loops that block all other messages on account of no multi-threading...unless GIF maybe? Or some update_overlay_stack message of course.
- tperry2x
- Posts: 1538
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: Can has Answer/Ask -like progress bar?
I also thought you could have an unobtrusive window, something like the popup I'm using here, which could update with a progress bar in much the same way you mention above. Again, just an idea.
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Can has Answer/Ask -like progress bar?
Like Richmond, I also dislike those indicators, like the Windoze 'Circles Chasing Circles' or the newish Mac 'Knight Rider' indicator, that are nonspecific about exactly how much progress has been made and how much is left to go. Although I do understand that sometimes such info can't be known ahead of time in certain situations, like for example when a download's byte/file-size is not yet known, so I would want this to have option(s) for a non-percentage-specific based activity indicator(s).
That reminds me, do we have a 'counting fingers' cursor like the classic macOS had? I quite liked that one.
I have made a progress bar widget that I can test with already. It is similar to one released by Trevor Devore but with a few more options, for example my version can be horizontal OR vertical orientations (so that it can easily be used in ways such as an Audio-Input level meter).
That reminds me, do we have a 'counting fingers' cursor like the classic macOS had? I quite liked that one.
Another option might be using a Widget, running in the UI thread independent of script execution (as seen with the Analog Clock widget), but you would still need to update the thing somehow from within your locked-down repeat loop. Maybe unlock messages, set its progress bar widget's progressPercentage property, then lock messages again? Hmmm....The overlay stack can't animate if the original stack is using repeat loops that block all other messages on account of no multi-threading...unless GIF maybe? Or some update_overlay_stack message of course.
I have made a progress bar widget that I can test with already. It is similar to one released by Trevor Devore but with a few more options, for example my version can be horizontal OR vertical orientations (so that it can easily be used in ways such as an Audio-Input level meter).
- tperry2x
- Posts: 1538
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: Can has Answer/Ask -like progress bar?
You mean this one? I was thinking of updating the black & white 'spinner' to a colour version of this hand, in OXT Lite.OpenXTalkPaul wrote: ↑Fri Mar 29, 2024 2:13 am That reminds me, do we have a 'counting fingers' cursor like the classic macOS had? I quite liked that one.
- richmond62
- Posts: 2776
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Can has Answer/Ask -like progress bar?
I prefer the one I just made (but I would):
- -
Also. much more appropriate for us who were brought up with Pounds, shillings, and pence.
- -
Also. much more appropriate for us who were brought up with Pounds, shillings, and pence.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1538
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: Can has Answer/Ask -like progress bar?
'handy' if you had 6 digits, but otherwise, think I'll stick with the original -, then coloured & digit sequence reordered.
Here's a revised mono and colour version.
I've elected to keep these at the standard 16px sizes, because anything higher looks a bit like 'fisher-price' play-cursors in my opinion. Demo of it in action, having replaced the mono-beachball/radiation spinner
https://www.tsites.co.uk/otherstuff/new-hand.m4v
Here's a revised mono and colour version.
I've elected to keep these at the standard 16px sizes, because anything higher looks a bit like 'fisher-price' play-cursors in my opinion. Demo of it in action, having replaced the mono-beachball/radiation spinner
https://www.tsites.co.uk/otherstuff/new-hand.m4v
Who is online
Users browsing this forum: No registered users and 29 guests