Observations Re: Images

Jeanne A. E. DeVoto jeanne at runrev.com
Thu May 23 18:13:13 EDT 2002


At 7:27 AM -0700 5/23/2002, Rob Cozens wrote:
>I created an empty stack, started using revimagelibrary.rev, and
>created a button referencing an image in the library.  The image
>appears in the new stack as expected; however it does not disappear
>when I stop using the image library, and it is still present if I
>stop Revolution and restart my new stack without using the image
>library.  From this I conclude the image is transferred to the stack
>from the library. I would be happy if this is not the case, but have
>no other explanation for this behavior.

It's because the standard icon library (and the other built-in libraries)
are loaded into memory whenever the development environment is running.
When you set a button's icon, you can set it to show any image of any stack
in memory - not just images in your own stack, but images in any loaded
stack. The built-in libraries are also stacks, so as long as they are
loaded, buttons that reference one of their images display the proper icon.

>>Um? Not sure what you are referring to here as "the stack's image library".
>>Can you give more details? (I've done just this - an image in a group that
>>appears on more than one card - without problems.)
>
>If I open the image library window and select the pop up after
>"Library", the last choice is the current stack.  This is what I am
>referring to as the stack's image library.

Aha. I think there are two things going on here: one is a slight
misunderstanding and the other's a bug.

The Image Library isn't actually a separate object or separate part of the
stack ("the stack's image library") - it's an interface that shows all the
images in a stack. (The built-in image libraries are themselves stacks.) So
when you open the Image Library window and choose your own stack from the
popup, the window is listing all the images it can find in your stack.
These don't exist separately in some sort of library object - the Image
Library is just a viewer for the existing images.

The bug is that apparently the library isn't properly filtering out images
it finds in shared groups, so it's displaying each image once per card, and
you see duplicates. But the image in the stack isn't being duplicated - the
Image Library is just showing that single image as many times as there are
cards.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list