Page 3 of 3

Re: standalone woes

Posted: Mon Dec 23, 2024 12:02 pm
by richmond62
Wow! I'd never heard of Puma Punka.

Fantastic, Thanks.

Re: standalone woes

Posted: Mon Dec 23, 2024 12:29 pm
by neville
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]

Re: standalone woes

Posted: Mon Dec 23, 2024 12:37 pm
by richmond62
How about a template answer/ask palette with a properties palette?

Re: standalone woes

Posted: Mon Dec 23, 2024 12:45 pm
by neville
How about a template answer/ask palette with a properties palette?
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 ...

Re: standalone woes

Posted: Mon Dec 23, 2024 12:50 pm
by tperry2x
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.

Re: standalone woes

Posted: Mon Dec 23, 2024 1:05 pm
by neville
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.

Re: standalone woes

Posted: Mon Dec 23, 2024 2:29 pm
by tperry2x
neville wrote: Mon Dec 23, 2024 1:05 pm 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'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:
assoc-dialog.png
assoc-dialog.png (31.87 KiB) Viewed 751 times
LC did much the same thing themselves, with a custom alert dialog:
lc-assoc.png
lc-assoc.png (12.64 KiB) Viewed 750 times

Re: standalone woes

Posted: Mon Dec 23, 2024 4:36 pm
by richmond62
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.

Re: standalone woes

Posted: Mon Dec 23, 2024 4:46 pm
by richmond62
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? :lol:

Re: standalone woes

Posted: Mon Dec 23, 2024 10:34 pm
by neville
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.

Re: standalone woes

Posted: Tue Dec 24, 2024 8:15 pm
by richmond62
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.