delete last card problems

Dennis Brown see3d at writeme.com
Sun May 22 15:36:28 EDT 2005


Bob,

You could do this by going through a loop to clear each field on the  
card:

   repeat with c=1 to the number of controls in card 1
     get the name of control c --button "btnName"
     if word 2 of it is quote&"label field"&quote then next repeat -- 
filter out any label fields
     if word 1 of it is "field" then put empty into it
   end repeat

Dennis

On May 22, 2005, at 3:01 PM, Bob Hartley wrote:

> 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
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list