switch - case works different on Win-Mac !?

Tiemo Hollmann TB toolbook at kestner.de
Tue Jul 3 12:47:51 EDT 2007


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 don’t 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 don’t 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 don’t
know, where to look for any more and can’t debug it on my Win machine,
because on win I can’t reproduce this error.

Has anyone seen something like this before and has any idea where to look
for?

Thanks for any hint

Tiemo

 

 

 

 




More information about the use-livecode mailing list