Charles,

You're right. The correct order of the last lines should probably be the 
following:
I was being called to dinner and didn't check carefully enough.

end repeat
end repeat
delete char -1 of theList
put theList into fld "recommendations"
end mouseUp

--- On Fri, 10/12/12, Michael Kann <[email protected]> wrote:

From: Michael Kann <[email protected]>
Subject: Re: Repeat script does not work
To: "How to use LiveCode" <[email protected]>
Date: Friday, October 12, 2012, 2:53 PM

Charles, 

Could it be this:


on mouseUp 

repeat with y = 1 to the num of cards

if the mark of card y = false
then next repeat
end if

put the num of btns of card y into nbr

repeat with n = 1 to nbr

if the style of btn n is "checkbox" and the hilite of btn n is true then

         put the uMyLabel of btn n into tName
         put tName & cr after theList
end if

end repeat
delete char -1 of theList

end repeat

put theList into fld "recommendations"

end mouseUp

Mike

--- On Fri, 10/12/12, Charles Szasz <[email protected]> wrote:

From: Charles Szasz <[email protected]>
Subject: Repeat script does not work
To: [email protected]
Date: Friday, October 12, 2012, 2:20 PM

The following script works for finding a checkbox that is checked and putting 
its custom property (uMyLabel) into the field "recommendations" on the marked 
card that it is on. However, it fails to put the uMyLabel of another checked 
checkbox that is on another marked card into the field "recommendations".  What 
am I missing here!

on mouseUp  
   repeat with y = 1 to the number of cards
      if the mark of card y = true then
         put the number of buttons of card y into nbr
      end if
   end repeat
   
   repeat with n = 1 to nbr
      if the style of button n is "checkbox" and the hilite of button n is true 
then
         put the uMyLabel of button n into tName
         put tName & cr after theList
      end if
   end repeat
   delete char -1 of theList
   put theList into field "recommendations"
end mouseUp

Charles Szasz
[email protected]




_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to