Re: Best practise for a quiz control?

2015-07-28 Thread Bob Sneidar
I was just thinking about an alternative to modal processing, because I have a 
stack I want to be modal just so I can interrupt the flow of the calling 
program. However, if I throw an error while modal, say a database connection 
error which I occassionally get because I am using an iffy wireless router, I 
cannot interact with the debugger. 

What I was thinking is having a toggle variable that contains something like 
“pre” or “post”. The handler that calls the stack would have two sections. One 
“if pModal is ‘pre’" the other “else — if pModal is “post”. 

Now in the calling openStack handler I would get the object that opened the 
stack and the handler that opened it. Once done, I would send the handler with 
the arguement “post” in time, then close the stack. I can pass data back and 
forth with the dialogData. 

Using this method I can avoid the issues that come with calling a stack as 
modal, especially during development. I could also have the advantage of 
calling multiple stacks “pseudo-modally” without the stacks interfering with 
each other. 

Bob S


> On Jul 24, 2015, at 02:52 , Mark Waddingham  wrote:
> 
>> I am not sure, what my loop will be doing, while I opened modal the answer
>> window? Will the loop wait for the user answer in the modal window in both
>> above cases, or is the modal window completely independent from the loop and
>> the loop runs on? How can I hold my loop waiting for the user action in the
>> modal window?
> 
> When you 'modal' a stack, the modal command will block the current script 
> until the dialog closes. (e.g. You have an OK / Cancel button which do 'close 
> this stack').
> 
> Note that messages *are* dispatched whilst this blocking occurs - otherwise 
> events wouldn't get processed so you wouldn't have any user interaction.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

AW: Best practise for a quiz control?

2015-07-24 Thread Tiemo Hollmann TB
Hi Tim,
thanks for your recommendation
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von tbodine
Gesendet: Freitag, 24. Juli 2015 15:54
An: use-revolut...@lists.runrev.com
Betreff: Re: Best practise for a quiz control?

Hi.
I would definitely write my own handler to manage and display the questions
and call that handler with a Send command instead of the forever loop. 
-- Tom Bodine




--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Best-practise-for-a-quiz-cont
rol-tp4694294p4694305.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Best practise for a quiz control?

2015-07-24 Thread tbodine
Hi.
I would definitely write my own handler to manage and display the questions
and call that handler with a Send command instead of the forever loop. 
-- Tom Bodine




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Best-practise-for-a-quiz-control-tp4694294p4694305.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


AW: Best practise for a quiz control?

2015-07-24 Thread Tiemo Hollmann TB
Hi Mark,
thanks for clarifying this part of my question!
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von Mark Waddingham
Gesendet: Freitag, 24. Juli 2015 11:53
An: How to use LiveCode 
Betreff: Re: Best practise for a quiz control?

> I am not sure, what my loop will be doing, while I opened modal the 
> answer window? Will the loop wait for the user answer in the modal 
> window in both above cases, or is the modal window completely 
> independent from the loop and the loop runs on? How can I hold my loop 
> waiting for the user action in the modal window?

When you 'modal' a stack, the modal command will block the current script
until the dialog closes. (e.g. You have an OK / Cancel button which do
'close this stack').

Note that messages *are* dispatched whilst this blocking occurs - otherwise
events wouldn't get processed so you wouldn't have any user interaction.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Best practise for a quiz control?

2015-07-24 Thread Mark Waddingham
I am not sure, what my loop will be doing, while I opened modal the 
answer
window? Will the loop wait for the user answer in the modal window in 
both
above cases, or is the modal window completely independent from the 
loop and
the loop runs on? How can I hold my loop waiting for the user action in 
the

modal window?


When you 'modal' a stack, the modal command will block the current 
script until the dialog closes. (e.g. You have an OK / Cancel button 
which do 'close this stack').


Note that messages *are* dispatched whilst this blocking occurs - 
otherwise events wouldn't get processed so you wouldn't have any user 
interaction.


--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Best practise for a quiz control?

2015-07-24 Thread Tiemo Hollmann TB
Hello,

What I want to do:

The user gets a kind of multiple choice question,  answers by clicking his
choice in a list or answering a dialog (two different cases). The answer
dialog has to be a modal window, not the standard answer dialog, because I
have to place the dialog window at a certain screen position. After
answering, the next question is being asked. This is a kind of loop with
dialogs.

My question:

Should I build this  question-answer cycle in a "repeat forever" loop or in
a "myHandler", which has a "send myHandler to me in 1" at the end. Or is
there a better design approach for this?

I am not sure, what my loop will be doing, while I opened modal the answer
window? Will the loop wait for the user answer in the modal window in both
above cases, or is the modal window completely independent from the loop and
the loop runs on? How can I hold my loop waiting for the user action in the
modal window?

Thanks for your recommendations

Tiemo

 

 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode