Problems with the DO command

Ian McKnight ianmck at macunlimited.net
Tue Aug 6 08:46:02 EDT 2002


BlankHi 

A newcomer to Revolution, I was experimenting with arrays and hit upon the idea of using the DO command to write this handler.

on processMyTable tcommand
  repeat with ty = 1 to 10
    repeat with tx = 1 to 10
      do tcommand
    end repeat
  end repeat
end processMyTable

The objective is to provide the handler with the statement(s) that have to be applied to each cell in the array, rather than repeat similar lines of code for each action.

When I put this call into a mouseup handler -- no problems
processmytable "put empty into mytable[tx,ty]"

However, this handler 

processmytable "put mytable[tx,ty] after last char of fld quote&mydisplay&quote "


causes this error.


Error description:  do: can't find command
--------------------
do tcommand
--------------------
Value: &


I've tried building the statement in a variable and passing the variable to my handler but that doesn't work either. I suspect that I am missing something pretty obvious but what it is is eluding me.

Could someone shed some light please.

BTW I am using a licensed version of Revolution.

Thanks



Ian McKnight

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20020806/ff08ee0b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Blank Bkgrd.gif
Type: image/gif
Size: 145 bytes
Desc: not available
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20020806/ff08ee0b/attachment.gif>


More information about the use-livecode mailing list