<doc>
  <legacy_id>1418</legacy_id>
  <name>IDChanged</name>
  <type>message</type>
  <syntax>
    <example>IDChanged <i>oldID</i>,<i>newID</i></example>
  </syntax>
  <library></library>
  <objects>
    <image/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <message tag="nameChanged">nameChanged Message</message>
    <property tag="altID">altID Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Sent to an <keyword tag="image">image</keyword> when its <property tag="ID">ID</property> <glossary tag="property">property</glossary> is changed.</summary>
  <examples>
    <example>on IDChanged prevID,currentID <code><i>-- update ID stored in another object</i></code></p><p>  set the storedID[the short name of image ID prevID] of this stack \</p><p>     to currentID</p><p>end IDChanged</example>
  </examples>
  <description>
    <p>Handle the <b>IDChanged</b> <keyword tag="message box">message</keyword> if you want to make updates when an <glossary tag="image">image's</glossary> <property tag="ID">ID</property> is changed.</p><p/><p><b>Parameters:</b></p><p>The <i>oldID</i> is the <glossary tag="image">image's</glossary> original ID number.</p><p/><p>The <i>newID</i> is the <glossary tag="image">image's</glossary> new ID number.</p><p/><p><b>Comments:</b></p><p>The <b>ID</b> <glossary tag="property">property</glossary> of most <glossary tag="object">objects</glossary> is set when the <glossary tag="object">object</glossary> is created and cannot be changed. There are two exceptions: <function tag="stacks">stacks</function> and <glossary tag="image">images</glossary>.</p><p/><p>You can set the <b>ID</b> of an <keyword tag="image">image</keyword> to any positive <keyword tag="integer">integer</keyword>. Be careful not to set an <keyword tag="image">image</keyword> <property tag="ID">ID</property> to a number that's the <property tag="ID">ID</property> of another <keyword tag="image">image</keyword> in the same <object tag="stack">stack</object>: since LiveCode uses IDs to keep track of <glossary tag="object">objects</glossary>, a conflict may result in the inability to access one or both <glossary tag="object">objects</glossary>. The following ID numbers are reserved and should not be used for <keyword tag="image">image</keyword> IDs:</p><p/><p>        * 1-100: reserved for built-in cursors</p><p>        * 101-135: reserved for built-in brush shapes</p><p>        * 236-300: reserved for built-in patterns</p><p>        * 301-1000: reserved for built-in icons</p><p>        * 101,000-103,000: reserved</p><p>        * 200,000-299,999: reserved for application use</p><p/><p>The actual change is not triggered by the <b>IDChanged</b> <keyword tag="message box">message</keyword>, so <glossary tag="trap">trapping</glossary> the <keyword tag="message box">message</keyword> and not allowing it to <control_st tag="pass">pass</control_st> does not prevent the <property tag="ID">ID</property> from being changed.</p>
  </description>
</doc>