delete last card problems

Bob Hartley rev at armbase.com
Sun May 22 15:01:29 EDT 2005


Hi All

I haev a database with a group of fields on it. I have a  delete card 
button with the script
on mouseup
delete card
end mouseup

This works perfectly with one exception. If I delete all cards down to the 
last card I still see my database template. If however, I delete the last 
card I dont see my group of fields.

So I'd like to do something like this
Have a delete card button that will delete a card unless it is the last 
one, and if it is the last card only clear the fields

I thought of
on mouseup
if this card is not cd 1
then delete this card
end if
if this cd is cd 1
then clear all fields
end if
end mouseup

I get an error with this.....

Any ideas along this line?

cheers
bob


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/05/2005




More information about the use-livecode mailing list