Delete and object from script within the object?

Sean Cole (Pi) sean at pidigital.co.uk
Fri Dec 5 06:56:17 EST 2014


Hi Bill

Have the delete message on your stack script and use 'send "deleteTheImage
myImage" to this stack in 0 sec'. This will then wait until the current
message path has completed and then run the deleteTheImage command. That
way there will be no more scripts running that will stop it deleting.

Hope this helps

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
π
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

This email and any files transmitted with it may be confidential and are
intended solely for the use of the individual to whom it is addressed. You
are hereby notified that if you are not the intended recipient of this
email, you must neither take any action based upon its contents, nor copy
or show it to anyone. Any distribution, reproduction, modification or
publication of this communication is strictly prohibited. If you have
received this in error, please notify the sender and delete the message
from your computer.



Any opinions presented in this email are solely those of the author and do
not necessarily represent those of Pi Digital. Pi Digital cannot accept any
responsibility for the accuracy or completeness of this message and
although this email and any attachments are believed to be free from
viruses, it is the sole responsibility of the recipients.


Pi Digital Productions Ltd is a UK registered limited company, no. 5255609.
VAT GB998220972

On 4 December 2014 at 17:15, Bob Sneidar <bobsneidar at iotecdigital.com>
wrote:

> Right. You cannot delete an object that has a running handler.
>
> Bob S
>
>
> On Dec 3, 2014, at 14:10 , Björnke von Gierke <bvg at mac.com<mailto:
> bvg at mac.com>> wrote:
>
> send "deleteTheImage" && myImage to this stack in 0 seconds
>
> On 03 Dec 2014, at 22:57, William Prothero <prothero at earthednet.org
> <mailto:prothero at earthednet.org>> wrote:
>
> Folks:
> I’m trying to delete an image from a script within that image  LC doesn’t
> like that because the script in the object hasn’t finished yet.
>
> —the image script is:
> on mouseUp
>  put the name of me into myImage
>  deleteTheImage myImage"
> end mouseUp
>
> —In the stack script
> on deleteTheImage imageName
>   delete image imageName
> end deleteTheImage
>
> The command failed because the “end mouseUp” has not executed and LC won’t
> delete the object where a script is running.
>
> How should I approach this? Is there a command to dispatch a message after
> a short delay? I know there must be, I just can’t find it.
>
> Regards,
> Bill
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list