
Is there any way 2 change the font 4 input in Ask Dialogs?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Is there any way 2 change the font 4 input in Ask Dialogs?
I think the subject says it all (I had to use the 2s and 4s for that
. Again: can you change the font of the input window (the window that receives the user's input) in the ask dialogs, leaving untouched the font for the prompt and buttons?

Re: Is there any way 2 change the font 4 input in Ask Dialog
Hi Daniel,
yes
Best
Klaus
yes

Best
Klaus
Re: Is there any way 2 change the font 4 input in Ask Dialog
Maybe you want to know how to do this, too? 
Add this line to your handler(s):
...
set the textfont of fld 2 of cd 1 of stack "Ask Dialog" to "your fancy font here..."
ask "Whatever you want to know..."
...
Best
Klaus

Add this line to your handler(s):
...
set the textfont of fld 2 of cd 1 of stack "Ask Dialog" to "your fancy font here..."
ask "Whatever you want to know..."
...
Best
Klaus
Re: Is there any way 2 change the font 4 input in Ask Dialog
aaall right! short and sweet. Thanks!
Re: Is there any way 2 change the font 4 input in Ask Dialog
Hi,
That's what I ever wanted in HyperCard back in the good old days - customizable dialogs; and now, only some decades later, here they are :)
Question about:
It's in the stacks revaskdialog and revanswerdialog stacks (in the toolset folder), right? So if I put (visually modified) copies of those as substacks into my project, would this work? They'd be higher in the message passing order after all? (Well, this I can try myself, but if I'm writing here anyways ...)
Next: If I make a StandAlone, I'd then had both versions in it - as long as I don't deselect them in the maker settings. Would this only keep out the stacks from the toolset, or would it prohibit the (modified) same-name substacks, too?
Or is there another, more elegant way that I just didn't find yet in my laziness?
Anyways, thanks for the hint, have a good time!
Whow! Awesomeness!Klaus wrote: set the textfont of fld 2 of cd 1 of stack "Ask Dialog" to [...]
That's what I ever wanted in HyperCard back in the good old days - customizable dialogs; and now, only some decades later, here they are :)
Question about:
It's in the stacks revaskdialog and revanswerdialog stacks (in the toolset folder), right? So if I put (visually modified) copies of those as substacks into my project, would this work? They'd be higher in the message passing order after all? (Well, this I can try myself, but if I'm writing here anyways ...)
Next: If I make a StandAlone, I'd then had both versions in it - as long as I don't deselect them in the maker settings. Would this only keep out the stacks from the toolset, or would it prohibit the (modified) same-name substacks, too?
Or is there another, more elegant way that I just didn't find yet in my laziness?
Anyways, thanks for the hint, have a good time!
Re: Is there any way 2 change the font 4 input in Ask Dialog
Hi jGonz,
The standalone builder will put a copy of these stacks as substacks into your mainstack and if you do this manually
Livecode will complain about "A stack with this name is already in memory..." and you cannot change this
because it is mandatory the these stacks are named "Ask dialog" and "Answer Dialog"!
You cannot have two (sub-)stacks of the same name!

Check "dialogdata" in the dictionary, this wil help you roll your own!
Best
Klaus
yep, the ASK and ANSWER dialogs are "just" stacks - "revaskdialog.rev" and "revanswerdialoge.rev".JGonz wrote:It's in the stacks revaskdialog and revanswerdialog stacks (in the toolset folder), right? So if I put (visually modified) copies of those as substacks into my project, would this work? They'd be higher in the message passing order after all? (Well, this I can try myself, but if I'm writing here anyways ...)
The standalone builder will put a copy of these stacks as substacks into your mainstack and if you do this manually
Livecode will complain about "A stack with this name is already in memory..." and you cannot change this
because it is mandatory the these stacks are named "Ask dialog" and "Answer Dialog"!
NO! Just a copy of the current dialogs!JGonz wrote:Next: If I make a StandAlone, I'd then had both versions in it - as long as I don't deselect them in the maker settings.
You cannot have two (sub-)stacks of the same name!
Create your own "ask" and "anser" dialogs, they are just STACKS opened as MODAL in the endJGonz wrote:Or is there another, more elegant way that I just didn't find yet in my laziness?

Check "dialogdata" in the dictionary, this wil help you roll your own!

Best
Klaus
Re: Is there any way 2 change the font 4 input in Ask Dialog
Hi,
Ooooops - would have been nice to just "rob" the default stacks :/
Anyways, thanks a lot for your quick reply!
put MyStuff into the DialogData -- MyStuff = ["Blabla", "Fubar!", "What?"]
modal MyDialogStack -- this would be the analogue to [ask "Blabla" with "Fubar!" titled "What?"]
Now the dialog stack should pop up, and get populated using the preOpenStack handler on the card. When done, I'd get the results in my calling handler:
put the DialogData into MyVar -- and do whatever with it ...
Right?
Having quite a hard time now, the times I coded hardcore in HyperCard are long gone, and there isn't a "CompileIt!" anymore, my most beloved tool in these days. And my knowledge of 68K assembler is quite useless now anyways :/
But I very much appreciate LiveCode, it brought me back to "the bright side" (from the darkness of coding in VBA, Access and such faceless atrocities), and from what I have seen in my very first tests it would be able to do my jobs quite easily.
I'll need some time to get back into my good old coding habits, exploring now what has changed, what has been added, and last not least, what I have forgotten ...
Sorry for getting off topic, have a good time!
Ooooops - would have been nice to just "rob" the default stacks :/
Anyways, thanks a lot for your quick reply!
Will do. Atm getting a bad headache studying the code of the revaskdialog, but I seem to understand how it works - at least the basics. So a solution would look like this, I assume:Klaus wrote:Create your own "ask" and "anser" dialogs, they are just STACKS opened as MODAL in the end
put MyStuff into the DialogData -- MyStuff = ["Blabla", "Fubar!", "What?"]
modal MyDialogStack -- this would be the analogue to [ask "Blabla" with "Fubar!" titled "What?"]
Now the dialog stack should pop up, and get populated using the preOpenStack handler on the card. When done, I'd get the results in my calling handler:
put the DialogData into MyVar -- and do whatever with it ...
Right?
Having quite a hard time now, the times I coded hardcore in HyperCard are long gone, and there isn't a "CompileIt!" anymore, my most beloved tool in these days. And my knowledge of 68K assembler is quite useless now anyways :/
But I very much appreciate LiveCode, it brought me back to "the bright side" (from the darkness of coding in VBA, Access and such faceless atrocities), and from what I have seen in my very first tests it would be able to do my jobs quite easily.
I'll need some time to get back into my good old coding habits, exploring now what has changed, what has been added, and last not least, what I have forgotten ...
Sorry for getting off topic, have a good time!
Re: Is there any way 2 change the font 4 input in Ask Dialog
Almost, but note that the dialogData is just a convenient, always-available variable intended for brief storage to and from dialog stacks (though you can use it for anything, but it will get overwritten at any time.) It will hold your data but it doesn't automatically do anything, it's just a variable container. Mainly it saves you the trouble of creating your own global variable.So a solution would look like this, I assume:
put MyStuff into the DialogData -- MyStuff = ["Blabla", "Fubar!", "What?"]
modal MyDialogStack -- this would be the analogue to [ask "Blabla" with "Fubar!" titled "What?"]
Now the dialog stack should pop up, and get populated using the preOpenStack handler on the card. When done, I'd get the results in my calling handler:
put the DialogData into MyVar -- and do whatever with it ...
Right?
So after you populate the dialogData with values, you need to script the dialog stack to put that data into its fields, or set up its buttons, or whatever. When the user closes the dialog, a script in the dialog stack needs to gather up the user responses and put that back into the dialogData so that the calling handler can retrieve it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com