Thank you all for your reactions, however I seem to have not made the problem entirely clear so I'll try again.

The script works on windows. The whole project is "freshly" generated on MX2004WIN When I "crosscompile" for osx and try it out on a mac, the script is called, the Timer is generated (hence the alert in the script) but the GOon handler is never called.

And that's what I'm not getting. This is not platform specific code which works on windows and not on mac. That's something that makes me nervous.

So again, any clues, anyone ?

Bart

Bart Pietercil wrote:

This script functions as expected on windows.
I don't have access for the moment to a director on mac for debugging and of course things are not working as expected

Here's the script

property SpriteNum, myTimer, screen1,OrigText


on beginSprite me
 OrigText = member ("line1").text
 spritesToDimList = ["button_continue","button_stop"]
 repeat with i in spritesToDimList
   sendSprite(i,#dim)
 end repeat
 if(checkResolution(me)) then
   myTimer = timeout().new("GoOn",2000,#GoOn,sprite(SpriteNum))
   if(not(VoidP(myTimer))) then
     alert("timer exist")
   end if
 else
   myTimer = timeout().new("StopIt",2000,#StopIt,sprite(SpriteNum))
 end if
end



on checkResolution me
 screen1 = the desktoprectlist[1]
 if(screen1.right >= 1024) then
   return TRUE
 else
   return FALSE
 end if
end

on GoOn me
 alert("called")
 myTimer.forget()
aText = OrigText & return & member("line2").text && string(screen1.Right) && "*" && string(screen1.bottom) & return
 member ("line1").text = aText
 updatestage
 aText = aText & member("line3_correct").text
 member ("line1").text = aText
 sendSprite("button_continue",#UnDim)

end

on StopIT me
 myTimer.forget()
aText = OrigText & return & member("line2").text && string(screen1.Right) && "*" && string(screen1.bottom) & return
 member ("line1").text = aText
 updatestage
 aText = aText & member("line3_wrong").text
 member ("line1").text = aText
 sendSprite("button_stop",#UnDim)

end


on EndSprite me
 if(ObjectP(myTimer)) then
   myTimer.forget()
 end if
 member ("line1").text = OrigText
end


--

As I said it works as expected on win, on mac I get the alert timer exists and then nothing happens. Any clues before sunrise are very welcome.

TIA

Bart






[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to