Page 1 of 1
Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 6:59 am
by ghettocottage
I know this is possible, but I cannot find any threads on it, and the search words I am using are so ubiquitous that I am not even close to finding an answer:
Can I have an answer box pop up and then close after a few seconds. Bonus points if it sort of fades out.
my code:
Code: Select all
if tData is "No Results" then
answer tData
end if
Just to be sure, I went ahead and tried this, but it did not work:
Code: Select all
if tData is "No Results" then
answer tData close after 3 seconds then fade
end if
Re: Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 8:02 am
by shaosean
i don't know about the fade, but you can probably do something like this for the dialog to close after a few seconds..
Code: Select all
if tData is "No Results" then
answer tData
send "closeAnswer" to me in 3 seconds
end if
on closeAnswer
if ("answer" is among the lines of the openStacks) then
close stack "answer"
end if
end closeAnswer
I don't have LiveCode installed, so not 100% certain what the name of the answer stack is (I believe it is just answer though).. You may also want to do a check to see if
Re: Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 1:06 pm
by Klaus
Hi Sean,
shaosean wrote:...You may also want to do a check to see if
yes? Come on, try it!
@ghettocottage
I really would reverse the commands here:
Code: Select all
...
if tData is "No Results" then
## answer tData
send "closeAnswer" to me in 3 seconds
answer tData
end if
...
And then you could add a repeat loop in the "closeAnswer" handler to slowly fade out
the stack by setting its BLENDLEVEL.
Best
Klaus
Re: Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 1:55 pm
by [-hh]
was a bit complicated

Re: Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 3:22 pm
by dunbarx
All good stuff. But I wonder if in this case the simplest method is to make your own small dialog stack, and use visual effects.
Craig
Re: Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 7:14 pm
by [-hh]
was a bit complicated

Re: Temporary Answer Dialoge
Posted: Thu Nov 10, 2016 7:58 pm
by ghettocottage
dunbarx wrote:All good stuff. But I wonder if in this case the simplest method is to make your own small dialog stack, and use visual effects.
Craig
Thanks for the different ideas for this. Craig's thought was indeed the simplest and most flexible. I just created a sub stack with a field in it for messages and wrote a little function to show/hide it with whatever message I want.