Image IDs

Peter Haworth pete at lcsql.com
Mon Apr 27 15:20:30 EDT 2015


Thanks Rick.  Problem is, if I want to define an icon for a button, for
example, I can only use a simple image ID.  For a time I was setting the
button icons to the name of an image on startup as you suggested but
there's still confusion in my mind as to whether the resulting image ID
might resolve to an image in someone else's stack.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Mon, Apr 27, 2015 at 11:55 AM, Rick Harrison <harrison at all-auctions.com>
wrote:

> Hi Pete,
>
> Why don’t you create your own names for referring to your images.
> You can call them something like PeteImage123001 - PeteImage88999.
> Then you don’t have to concern yourself with image ID’s.  You can do the
> same with the button you create as well.
>
> I hope that works for you so you don’t have to keep wrestling with
> image IDs.
>
> On the other hand, you do ask some interesting questions, and it would
> be nice to know the answers as some of the documentation is rather
> obscure and confusing.
>
> Good luck!
>
> Rick
>
>
> > On Apr 27, 2015, at 1:56 PM, Peter Haworth <pete at lcsql.com> wrote:
> >
> > I'm trying to wrap my head around how LC resolves references to image IDs
> > when used as button icons or in the imageSource property.
> >
> > My fist confusion comes from the dictionary entry for the ID property.
> It
> > lists ranges of image IDs that are reserved for specific purposes.  The
> > range 200,000-299,999 is described as "reserved for application use" What
> > does that mean exactly?  For example, if I create a new image in a stack,
> > LC allocates it an id in the 1000 range upwards, not in the
> 200,000-299,999
> > range.  Should I be changing the ID to be in the "reserved for
> application
> > use" range?
> >
> > The next confusion comes from the dictionary entry for imageSource which
> > includes what to me is an extremely badly written description of where LC
> > looks for images and in what order, which to my simple mind is pretty
> much
> > incomprehensible :-)
> >
> > For example, the first place it looks is "1) the stack of the object's
> > behavior (if applicable)".  Got it.
> >
> > Next on the list "2) the stack of the owner of the object's behavior".
> > Isn't that the same as "the stack of the object's behavior"?  An object
> can
> > only be in one stack can't it?
> >
> > After that, there are a series of vertical ellipses ending with "n) the
> > stack of the object's stack's behavior(if applicable)".  I think that
> means
> > that if the behavior is in a substack, this would cause it to look in
> that
> > substack's main stack.  But what do they vertical ellipses refer to?
> >
> > The rest of it is pretty comprehensible, except perhaps for "C) the
> > object's stack's mainstacks substacks"  Huh?
> >
> > The description makes no mention of looking in the stacksInUse which I
> know
> > for a fact is searched for image IDs since I've successfully placed
> images
> > in a library stack and references to them are correctly resolved. Anyone
> > know when library stacks are searched relative to the other locations
> > mentioned?
> >
> > The point of all this is I'm trying to determine if there is a
> possibility
> > that an image ID I use may be duplicated in another developer's stack and
> > the other developer's image used instead of mine.  It seems there is
> since
> > the locations searched include any open stacks and any library stacks.
> >
> > Finally, this area of LC seems really messy to me.  If references to
> images
> > were in the same format as behavior references, there would be no need
> for
> > this complicated search hierarchy.
> >
> > Pete
> >
> >
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> > Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> > SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> > _______________________________________________
> > 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
>
>
> _______________________________________________
> 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