Page 1 of 1

trick for last image

Posted: Mon Jul 21, 2014 7:07 am
by robm80
I import images very frequently. In the script I wrote "delete last image" to prevent gathering. No problem.
But when meanwhile an image is imported that has to stay, it is removed, when an new image is imported.
Is there a trick for a "must image" to stay .
For the moment I created 2 buttons, one with, the other without "delete last image".
I played with "newImage" but no succes.

Re: trick for last image

Posted: Mon Jul 21, 2014 7:43 am
by richmond62
Your post is very difficult to understand.

Please try and explain it rather better.

Re: trick for last image

Posted: Mon Jul 21, 2014 12:46 pm
by Klaus
Hi Rob,

well, "last img" is always "last img", but YOU, as a developer, need to manage which images can be deleted and which ones NOT!
There is not trick in Livecode for that! 8)


Best

Klaus

Re: trick for last image

Posted: Mon Jul 21, 2014 3:28 pm
by dunbarx
Hi.

Set a custom property of the images that must not be deleted. Then in your handler, (pseudocode)

Code: Select all

if the doNotDelete of last image = "justDont" then exitDelete --could be any image, of course
Craig Newman