Delete Card in LC 9 problem

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Entdecker
Posts: 11
Joined: Tue Oct 27, 2015 4:35 pm

Delete Card in LC 9 problem

Post by Entdecker » Mon Jun 18, 2018 10:42 pm

hi guys,
in LC 9 it's not possible to delete a card, when an object script is execution. In LC 7 was that possible.

So, how can I find all scripts is execution (in the background) and how can I stop them?

On my stack I have a clock, which is show on all cards.
on moveTime
...
send "moveTime" to me in 999 milliseconds
end moveTime

The field with the time a part of a group, which is a shared group and behave like a background. There for I can't delete it with delete it for all other cards as well.

How can I solve this problem?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Delete Card in LC 9 problem

Post by dunbarx » Tue Jun 19, 2018 12:02 am

Hi.

In v. 8 a command to delete a card would be queued until a running handler ends. Likely in v9 as well.

But you are correct. In v7 the command could be executed while the handler was running.

Feature, hassle or bug?

Craig Newman

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Delete Card in LC 9 problem

Post by jacque » Tue Jun 19, 2018 9:45 pm

If you think the clock is the problem, remove it before deleting the card. I assume it's placed on every card, so something like this:

Code: Select all

remove group "clock" from this card
delete this card
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Entdecker
Posts: 11
Joined: Tue Oct 27, 2015 4:35 pm

Re: Delete Card in LC 9 problem

Post by Entdecker » Tue Jun 19, 2018 10:08 pm

Hi Jacque,
thats sounds very well. I found an other way by stoping the clock before and restart it after the deleting.

But I still can't understand why DELETE CARD in the IDE (Editor) delete the card, when the clock is still ticking, als the command DELETE THIS CARD can't do it (anymore). Tricky for beginners.

Best regards, Jens.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Delete Card in LC 9 problem

Post by jacque » Tue Jun 19, 2018 10:27 pm

Your way is good too. I suspect the IDE is trying to make things "easier" for us by managing running scripts itself. The IDE uses frontscripts, which intercept messages before your own scripts get them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”