As Phil suggested, the cantdelete property is provided for this. Any object with that property set can't be selected easily. Mark's deletekey handler would make a good safeguard in addition.
Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On Sep 29, 2011, at 1:23 AM, Pete <p...@mollysrevenge.com> wrote: > What I see is workaround for what is a bug in LC. Definitely need to figure > out a solution but report this to the QCC > Pete > Molly's Revenge <http://www.mollysrevenge.com> > > > > > On Wed, Sep 28, 2011 at 10:21 PM, Mark Talluto > <use...@canelasoftware.com>wrote: > >> You can use the following messages to capture the delete and prevent it >> from passing by checking if is one of the objects you wish to protect. >> >> deleteKey >> backspaceKey >> >> --example >> on deleteKey >> if "protect me" is in the short name of the selobj then >> --do not delete >> else >> pass deleteKey >> end deleteKey >> >> >> Best regards, >> >> Mark Talluto >> http://www.canelasoftware.com >> >> >> >> >> On Sep 28, 2011, at 10:38 AM, Art DiVito wrote: >> >>> I need to prevent users from deleting a control by selecting it with the >> pointer tool and hitting the delete key. >>> According to the LiveCode dictionary (under "deletefield"), an "undo" >> will work for fields. However, this appears to be true for buttons, but NOT >> for fields. Thus, >>> On deletebutton >>> Answer "Can't do that!" >>> send "undo" to this card in 5 milliseconds >>> end deletebutton >>> works fine. However, >>> On deletefield >>> >>> Answer "Can't do that!" >>> >>> send "undo" to this card in 5 milliseconds >>> >>> end deletefield >>> does NOT work. >>> I don't know whether it will work for images (I need to prevent them from >> being deleted too). >>> What can I do? >>> Thanks. >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode