AW: switch - case works different on Win-Mac !?
Tiemo Hollmann TB
toolbook at kestner.de
Wed Jul 4 07:31:33 EDT 2007
Good idea,
thanks Dave
-----Ursprüngliche Nachricht-----
Von: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] Im Auftrag von Dave
Gesendet: Mittwoch, 4. Juli 2007 12:48
An: How to use Revolution
Betreff: Re: switch - case works different on Win-Mac !?
Hi,
As a test, do this:
set the cpTest of this stack to empty
switch (tTarget)
case "btnBildKopieren"
put the cpTest of this stack into myTemp
put tTarget & cr after myTemp
set the cpTest of this stack to myTemp
break
-- copy the above code for each "case".
end switch
put the cpTest of this stack into myTemp
answer myTemp
This should tell you if the case statements are running into each other.
Hope this helps
All the Best
Dave
On 3 Jul 2007, at 17:47, Tiemo Hollmann TB wrote:
> Hello all,
>
> I am struggeling with a mysterious problem, where a mac standalone
> calls
> different handlers as a win standalone in a switch structure, build
> on Win
> with 2.8.1. I have one big switch structure on stack level to
> handle all
> button ups. It looks like this, nothing sophisticated:
>
>
>
> switch (tTarget)
>
> -- some more cases
>
> case "btnBildKopieren"
>
> if the cpTest of this stack is true then answer "Test 1"
>
> -- calling some handlers
>
> break
>
> case "btnBildSpeichern"
>
> if the cpTest of this stack is true then answer "Test 2"
>
> -- calling some handlers
>
> break
>
> case "btnBildEinfügen"
>
> if the cpTest of this stack is true then answer "Test 3"
>
> -- calling some handlers
>
> break
>
> -- some more cases
>
> end switch
>
>
>
> This worked perfect on Win, but now testing on Mac more than one case
> structure is executed (at least it seems so, because the result is
> as if
> so), though I have a break in each case. Because I dont have a Mac
> for
> testing, I integrated the above test answers to see which way the
> handler
> goes. So I set a custom property cpTest to true to get the
> answers to
> follow the execution. Now the funny thing happens. When activating
> the test
> answers, everything works OK on Mac as on Win. Once I set the cpTest
> property to false and I dont get the answer dialogs, the program
> brings the
> unwanted results again and runs probably into different case
> structures. I
> changed already the sequence of case structures, without result. I
> dont
> know, where to look for any more and cant debug it on my Win machine,
> because on win I cant reproduce this error.
>
> Has anyone seen something like this before and has any idea where
> to look
> for?
>
> Thanks for any hint
>
> Tiemo
>
>
>
>
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list