Re: Suicide
http://forums.livecode.com/viewtopic.php?f=7=25742=133791=harakiri#p133783 Regards, Sri -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Suicide-tp4707891p4707941.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ 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
Re: Suicide
Thanks for the suggestions everyone; not quite as simple as that: on mouseUp put the short id of this card into KARD put the name of this stack into STAQ put the long id of me into DIMENA send ("delete DIMENA") to card id KARD of stack STAQ in 0 ticks end mouseUp that works. Richmond. ___ 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
Re: Suicide
Don't use "to me" but use the card or the stack that contains the control to be deleted. -- Kind regards, Mark Schonewille Economy-x-Talk Http://economy-x-talk.com Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com Op 27 aug. 2016 om 13:55 heeft Paul Dupuis <p...@researchware.com> het volgende geschreven: > On 8/27/2016 7:27 AM, Richmond wrote: >> on mouseUp >> delete me >> end mouseUp > > The engine can not delete an object whose script is currently executing. > This has been a long know issue in LiveCode, but I am not sure it has > been documented > > In the Dictionary for "Delete" there is a warning: "Important! You > cannot delete the object whose script holds a currently executing > handler." but no explaination of the typical work-around below. > > on mouseUp > put the long id of me into tTarget > send "delete tTarget" to me in 0 ticks > end mouseUp > > So I guess you have to use "Assisted Suicide" since you need to send a > message to the engine to delete the object after it's script is done. > > ___ > 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
Re: Suicide
What is the use case, Richmond? If you want to delete any object on a card by just clicking on it, you can put this on the card script: on mouseup delete the mousecontrol end mouseup and make sure that the objects you want to delete do not have a mouseup handler. On Sat, Aug 27, 2016 at 2:55 PM, Paul Dupuis <p...@researchware.com> wrote: > On 8/27/2016 7:27 AM, Richmond wrote: > > on mouseUp > >delete me > > end mouseUp > > The engine can not delete an object whose script is currently executing. > This has been a long know issue in LiveCode, but I am not sure it has > been documented > > In the Dictionary for "Delete" there is a warning: "Important! You > cannot delete the object whose script holds a currently executing > handler." but no explaination of the typical work-around below. > > on mouseUp > put the long id of me into tTarget > send "delete tTarget" to me in 0 ticks > end mouseUp > > So I guess you have to use "Assisted Suicide" since you need to send a > message to the engine to delete the object after it's script is done. > > ___ > 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
Re: Suicide
On 8/27/2016 7:27 AM, Richmond wrote: > on mouseUp >delete me > end mouseUp The engine can not delete an object whose script is currently executing. This has been a long know issue in LiveCode, but I am not sure it has been documented In the Dictionary for "Delete" there is a warning: "Important! You cannot delete the object whose script holds a currently executing handler." but no explaination of the typical work-around below. on mouseUp put the long id of me into tTarget send "delete tTarget" to me in 0 ticks end mouseUp So I guess you have to use "Assisted Suicide" since you need to send a message to the engine to delete the object after it's script is done. ___ 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
Suicide
How can one do what I want to do with this script (which does not work)? on mouseUp delete me end mouseUp and does that constitute suicide, assisted suicide or euthanasia? Richmond. ___ 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