standalone woes
Forum rules
Be kind.
Be kind.
- richmond62
- Posts: 4832
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: standalone woes
Wow! I'd never heard of Puma Punka.
Fantastic, Thanks.
Fantastic, Thanks.
https://richmondmathewson.owlstown.net/
- neville
- Posts: 64
- Joined: Wed Jul 31, 2024 1:03 am
- Location: Canberra, Australia
- Contact:
Re: standalone woes
I do see your point about duplicating similar commands. Already I always have to look up the dictionary to see if I should be using "answer" or "ask" because I can never remember the difference.
"overloading" does have negative connotations, but I am not one to disparage the practice in general because I do it all the time (and often pay the price because of unforeseen consequences). Nevertheless cramming the properties into the message text does look like a rather inelegant hack. Not that I can see an elegant solution if you can't add extra tokens to the answer command.
[So what's the going under the hood/bonnet ... you would have to parse the text to look for the embedded properties ... can you not instead parse the whole command to look for tokens after the buttons list]
"overloading" does have negative connotations, but I am not one to disparage the practice in general because I do it all the time (and often pay the price because of unforeseen consequences). Nevertheless cramming the properties into the message text does look like a rather inelegant hack. Not that I can see an elegant solution if you can't add extra tokens to the answer command.
[So what's the going under the hood/bonnet ... you would have to parse the text to look for the embedded properties ... can you not instead parse the whole command to look for tokens after the buttons list]
- richmond62
- Posts: 4832
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: standalone woes
How about a template answer/ask palette with a properties palette?
https://richmondmathewson.owlstown.net/
- neville
- Posts: 64
- Joined: Wed Jul 31, 2024 1:03 am
- Location: Canberra, Australia
- Contact:
Re: standalone woes
Not quite sure what that means, how that would work? The answer dialog being a modal stack rather than an object that can be placed onto a card ...How about a template answer/ask palette with a properties palette?
- tperry2x
- Posts: 3210
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: standalone woes
Pretty much, it uses the wordoffset command to find the "backgroundcolor:" then looks for the next word as the colour. If the colour is a two-word thing (such as "light blue") then you type it as "light-blue" and the script replaces the "-" with a " " (space). This takes milliseconds to process, but I will agree that it's not as elegant as it could be.
(no less messy than what else is going on in that stack, and the rest of the IDE).
Adding extra parameters (normally, I'd be able to do this in a function), but I think at least some of this might also be hard coded into the engine at that level - as if you add any extra parameters, it just causes a script error. The answer dialogs are just looking through a preset number of arrays that are already determined (I assume by the engine). Good luck trying to find it in github. That's what I've been doing for the last 15 minutes....
edit, found it here.
Line 338, you can see it's predefined to take a set number of preset arguments, but nothing extra.
(no less messy than what else is going on in that stack, and the rest of the IDE).
Adding extra parameters (normally, I'd be able to do this in a function), but I think at least some of this might also be hard coded into the engine at that level - as if you add any extra parameters, it just causes a script error. The answer dialogs are just looking through a preset number of arrays that are already determined (I assume by the engine). Good luck trying to find it in github. That's what I've been doing for the last 15 minutes....
edit, found it here.
Line 338, you can see it's predefined to take a set number of preset arguments, but nothing extra.
- neville
- Posts: 64
- Joined: Wed Jul 31, 2024 1:03 am
- Location: Canberra, Australia
- Contact:
Re: standalone woes
aha, I thought it must be something deeper in the engine.
I think in the end it is not worth the effort of trying to bend the properties of the answer dialog to your will. As Richmond, I usually include my own custom alert substacks, along with a log stack, in larger projects.
I think in the end it is not worth the effort of trying to bend the properties of the answer dialog to your will. As Richmond, I usually include my own custom alert substacks, along with a log stack, in larger projects.
- tperry2x
- Posts: 3210
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: standalone woes
I'll probably leave what I've got in so far, but will stop short of modifying it further.
I think setting backgroundcolours and foregroundcolours might be a bit of a niche case, and as yourself and Richmond have both said: it's best to use a custom dialog that best suits your purposes in your stack.
I've done the same myself: LC did much the same thing themselves, with a custom alert dialog:
- richmond62
- Posts: 4832
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: standalone woes
Aksherly, to be honest, I do NOT use palettes/stacks for ANSWER dialogues: I use a group of 3 images:
1. The 'background' image with the question on it.
2. 2 images: YES and NO with the relevant code inside them.
This guarantees the "answer dialogue" looks exactly the same on every desktop platform.
1. The 'background' image with the question on it.
2. 2 images: YES and NO with the relevant code inside them.
This guarantees the "answer dialogue" looks exactly the same on every desktop platform.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 4832
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: standalone woes
Oh, and, Yes, I have a facsimile of Noah Webster's original dictionary that I bought in Philadelphia about 6 years syne, and I (kinky!) read it for pleasure, and Webster's comments and his decisions about how to spell things make a lot more sense than that ill-mannered slob with Tourettes who came up to Scotland and was rude to everyone (except, possibly, Flora MacDonald) - 'Dr' Johnson-: but I cannot shake off 16 years of English education enough to stop feeling funny anent Renascence, Dialog, Catalog, Skeptical, and the rest.
Of course I cud juist yaise the Scots: but Qhair wid we be then?
Of course I cud juist yaise the Scots: but Qhair wid we be then?

https://richmondmathewson.owlstown.net/
- neville
- Posts: 64
- Joined: Wed Jul 31, 2024 1:03 am
- Location: Canberra, Australia
- Contact:
Re: standalone woes
Just had a thought on what is possibly the elegant way to do it...
declare a system global theDialogProperties (a la the DialogData)
then in the preopenstack script for revAnswerDialog, for each line of the DialogProperties
set the (item 1 of line i of the DialogProperties) to (item 2 of line i of the DialogProperties)
The user then gets consistent dialogs after the first use, has a lot of options,, and could even override the default size and location settings.
R: to me "dialog" in this instance refers to something only distantly related to a "dialogue" so I'm happy to use the IT spelling. Very much the same as "program" and "programme", although thankfully here in Oz "program" is the standard spelling for both.
declare a system global theDialogProperties (a la the DialogData)
then in the preopenstack script for revAnswerDialog, for each line of the DialogProperties
set the (item 1 of line i of the DialogProperties) to (item 2 of line i of the DialogProperties)
The user then gets consistent dialogs after the first use, has a lot of options,, and could even override the default size and location settings.
R: to me "dialog" in this instance refers to something only distantly related to a "dialogue" so I'm happy to use the IT spelling. Very much the same as "program" and "programme", although thankfully here in Oz "program" is the standard spelling for both.
- richmond62
- Posts: 4832
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: standalone woes
Oddly enough (just checked) Noah Webster spelt Dialogue, Catalogue, and Sceptical the way I just scrieved them: his dictionary has no entry for Renascence, but he has a useful adjective Renascent.
https://richmondmathewson.owlstown.net/
Who is online
Users browsing this forum: No registered users and 2 guests