HyperNext Studio
HyperNext Studio => Interface Controls => Topic started by: sparkythex on December 18, 2010, 08:58:47 AM
-
I wanted to have an, "are you sure?" message.
I found in guide the following 2 examples.
however neither seem to work or I am misunderstanding.
local ans
@example from guide:
Dialog mess,button1,button2
Put AnswerFN into ans
If ans=1 Then
...
Else
...
EndIf
I have tried it this way:
Dialog mess 'Are you sure?',button 1,button 2error is "message not found"
I have tried it this way:
Dialog 'Are you sure?',button 1,button 2error is "OK message not found"
same error is when trying with some spaces.
~ ~~ Dialog 'Are you sure?', button 1, button 2
also tried to use
~ ~ Dialog 'Are you sure?',OK,cancel
&
~ ~ Dialog 'Are you sure?',yes,no
========
so then i found this other way.
local ans,choice
Put ChoiceFN(question,option1,option2) into choice
If choice=option1 Then
Dosomething1
Else
Dosomething2
EndIferror is " ^ parameter error!"
same error with:
~ ~ Put ChoiceFN('are you sure',yes,no)
and with
~ ~ Put ChoiceFN('are you sure',Ok,Cancel)
-
woot, woot.
this problem is self healing!
or rather i found an example of it
-- i was missing the quote marks
here is code for next person needing it!
Local ans
Dialog 'Restart?','Yes','No'
Put AnswerFN into ans
If ans=1 Then
Call DoRestart
GotoCard 1
EndIf