trick for last image

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
robm80
Posts: 161
Joined: Sat May 03, 2014 7:15 am

trick for last image

Post by robm80 » Mon Jul 21, 2014 7:07 am

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10102
Joined: Fri Feb 19, 2010 10:17 am

Re: trick for last image

Post by richmond62 » Mon Jul 21, 2014 7:43 am

Your post is very difficult to understand.

Please try and explain it rather better.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: trick for last image

Post by Klaus » Mon Jul 21, 2014 12:46 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: trick for last image

Post by dunbarx » Mon Jul 21, 2014 3:28 pm

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

Post Reply