As programming environments get more powerful programers get lazy
ambassador at fourthworld.com
Tue Sep 23 10:56:42 CDT 2008
Phil Davis wrote:
> ...you can store images as objects in a 'library' stack, and when
> you start using the stack, those images become available as icons
> in your app's buttons. Of course, your app has to know their IDs
> to take advantage of them.
> I use this in one product I maintain. It has one set of 9 buttons,
> but several language-specific sets of icons for those buttons, and
> each icon (image) set's ID numbers follow a similar pattern but fall
> in slightly different numeric ranges. So when the app figures out
> the current language, it uses the corresponding set of icons in the
> buttons. Not rocket science - which is why I like it!
To help library/component developers keep IDs distinct, Ken Ray has
started a database of "reserved" IDs ranges at the Rev Interoperability
Project -- see "Databases" at:
That DB lists the IDs used by Rev for cursors, icons, etc., the IDs used
by MC for those as well, and ranges of IDs developers can request for
their own use to avoid stepping on other developers' toes.
For example, Ken uses the range 037001 - 037999, and I use 044000 -
045000. This way we can trade components without having to worry about
image ID conflicts.
Anyone can reserve a range - just drop Ken a note. There are enough
available that if each component developer suggests a range of a
thousand for themselves we can support several thousand such developers
with no risk of conflict.
Managing Editor, revJournal
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode