Can't delete object from the script of a group(?)

André Bisseret andre.bisseret at wanadoo.fr
Fri Dec 21 06:14:22 EST 2012


Stating the problem as simply as possible :

On a cards of a stack I have 2 buttons 
- New card
- delete card
they are grouped in group "grAction" (backgroundBehavior true)

The script of group "grAction" is the following :
-------
on mouseUp
    switch the short name of the target
        case "New card"
            create cd
            break
        case "delete card"
          delete this cd
    end switch
end mouseUp
-----------
Button "new card" works as expected.
Button "delete card" does not work
I get: "can't delete object" 
and also (in Remo): "can't find object" 

Fortunately, if I put "delete this cd" as a mouseUp handler in btn "delete card" it works ;-))

What am I missing

Thanks for any hint

Best regards from Grenoble

André



More information about the use-livecode mailing list