What is wrong with this script?

charles61 cszasz at mac.com
Thu Nov 4 20:55:14 EDT 2010


Craig,

I should mention that the recursive message came after I discovered that I left out the following:

of marked card y for the first part of if the style of button b


on doStuff3
   --->Sends mouseUp to checkboxes that are checked on marked cards
   repeat with y = 1 to the number of marked cards
      repeat with b = 1 to the number of buttons of marked card y
         if the style of button b = "checkbox" and the hilite of button b of marked card y = true then
               send "mouseUp" to button b
            end if
      end repeat
   end repeat

When I of marked card y, the script that looks like the following caused the printing to hang and I had to force quit Rev 4.0 and relaunch Rev.

So this script is the one that is causing Rev to hang:
on doStuff3
   --->Sends mouseUp to checkboxes that are checked on marked cards
   repeat with y = 1 to the number of marked cards
      repeat with b = 1 to the number of buttons of marked card y
         if the style of button b of marked card y = "checkbox" and the hilite of button b of marked card y = true then
               send "mouseUp" to button b
            end if
      end repeat
   end repeat



Charles Szasz
cszasz at mac.com




On Nov 4, 2010, at 7:31 PM, dunbarx [via Runtime Revolution] wrote:

> Charles. 
> 
> Good. This never happens to me. 
> 
> Your script can be shortened, and sped up, a bit. Watch line wraps: 
> 
> on doStuff3 
>     repeat with y = 1 to the number of marked cards 
>        repeat with b = 1 to the number of buttons of marked cd y 
>           if the style of button b of marked cd y = "checkbox" and the 
> hilite of button b of marked cd y = "true" then 
>                 send "mouseUp" to button b 
>              end if 
>        end repeat 
>     end repeat 
> end doStuff3 
> 
> The important thing here is to see that the references to remote cards can 
> substitute for actually going there. Sometimes navigating is better; usually 
> not. So you never actually have to go to each card.   You don't have to 
> lock anything, or save your location and return. 
> 
> By using the mark property, you don't need to test to see if a card is 
> marked. 
> 
> Craig 
> _______________________________________________ 
> use-revolution mailing list 
> [hidden email] 
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 
> View message @ http://runtime-revolution.278305.n4.nabble.com/What-is-wrong-with-this-script-tp3027821p3027960.html 
> To unsubscribe from What is wrong with this script?, click here.
> 


-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/What-is-wrong-with-this-script-tp3027821p3028030.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list