two images with the same ID

Slava Paperno slava at lexiconbridge.com
Tue Jun 28 11:04:06 EDT 2011


Stephen said: " if there is an image id 1003 then ..."

The problem is not that there may be no image with a certain ID. It's the
opposite: my application has 2 images with the same ID (see Subject). They
are in different substacks, but when assigning an image as a button's icon I
am not allowed to indicate the substack--as far as I can tell I can only use
the numerical ID of the image. So LC decides which of the two images to use.

Terry said: " You can just give your imported image a different and
non-conflicting id using the property inspector." Changing the ID of an
image is risky because the image may be assigned to something else (like
another button) with that ID, and you'll break that assignment if you adjust
the ID. With just a few images and buttons you can mess around and fix this,
but what if you have hundreds of images and a bunch of duplicate IDs? This
can't be right... 

If using an image ID is the only way to assign the image to a button, then
the IDE should not allow duplicate IDs in the same stack file, even if they
are in different substacks. (Unless I'm missing something.)

Is this a bug? a corrupted stack?

Slava

> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] On Behalf Of stephen barncard
> Sent: Tuesday, June 28, 2011 3:52 AM
> To: How to use LiveCode
> Subject: Re: two images with the same ID
> 
> if there is an image id 1003 then ...
> 
> tested in 4.6.2
> 
> On 28 June 2011 00:04, Slava Paperno <slava at lexiconbridge.com> wrote:
> 
> > When I imported an image into a substack, it was given the same ID as
> > another image in another substack. When I tried to assign one of
> these
> > images as an icon to a button, the wrong image was assigned, and the
> button
> > didn't look like what I wanted it to look. The two images have
> different
> > short and long names, but as far as I could tell, only the numerical
> ID are
> > used to assign an image as an icon to a button. So I was stuck.
> >
> > I resolved this by importing the image again, so it was given a new,
> unique
> > ID. Now I have the same image imported twice. It's not a big problem
> > because
> > the image is small, but I wonder if this is a normal situation, and
> if not,
> > how would you resolve it in a smarter way?
> >
> > Thanks,
> >
> > Slava
> >
> >
> >
> > _______________________________________________
> > 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
> >
> 
> 
> 
> --
> 
> 
> 
> Stephen Barncard
> San Francisco Ca. USA
> 
> more about sqb  <http://www.google.com/profiles/sbarncar>
> _______________________________________________
> 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