Trying to use the metaphor

J. Landman Gay jacque at hyperactivesw.com
Fri Jun 18 13:50:41 EDT 2004


On 6/18/04 12:07 PM, Troy Rollins wrote:

> I started by marking all the cards (??).
> I then worked with my data a bit, all the while "unmarking cards" to be 
> kept. My thinking was that the system would allow me to "delete marked 
> cards" at the end of the cycle. I stupidly thought that "delete marked 
> cards" would work.
> 
> Which, of course, I haven't seemed to be able to make it do. I feel 
> elementary when I have to ask, how does one delete all the marked cards 
> in a stack? Frustrations like this will send OOP experienced programmers 
> running from this environment.

There is some frustration involved with learning any programming 
environment, and Rev is full-featured and comprehensive enough to have a 
learning curve.

The "delete" command supports only one object at a time. Just as you 
cannot "delete all buttons" or "delete fields 1 to 6", you cannot 
"delete all cards". There should be no surprise here.

To delete more than one of anything, you'll need a repeat loop. Remember 
that when deleting, it is wise to work from the "bottom up" so that the 
number of the object being deleted remains constant.

This will delete all marked cards:

repeat with x = the number of marked cards down to 1
  delete marked cd x
end repeat

You would do the same thing to delete a number of buttons, fields, or 
any other object.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list