<doc>
  <legacy_id>1318</legacy_id>
  <name>revCacheGeometry</name>
  <type>command</type>
  <syntax>
    <example>revCacheGeometry</example>
  </syntax>
  <library>Geometry library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Appearance  Positioning</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="lock messages">lock messages Command</command>
    <command tag="revUpdateGeometry">revUpdateGeometry Command</command>
    <message tag="resizeControl">resizeControl Message</message>
    <message tag="moveControl">moveControl Message</message>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Updates Geometry settings.</summary>
  <examples>
    <example>revCacheGeometry</example>
    <example>if the rect of me is not savedRect then revCacheGeometry</example>
  </examples>
  <description>
    <p>Use the <b>revCacheGeometry</b> <glossary tag="command">command</glossary> to update the Geometry pane's internal settings, after changing the size or position of <glossary tag="control">controls</glossary> that you have used the Geometry pane to specify behavior for.</p><p/><p><b>Comments:</b></p><p>The <b>revCacheGeometry</b> <glossary tag="command">command</glossary> rebuilds the Geometry <glossary tag="pane">pane's</glossary> internal settings for the controls on the current card, storing the baseline position that the automatic positioning and scaling uses as a starting point.</p><p/><p>The LiveCode development environment automatically executes the <b>revCacheGeometry</b> <glossary tag="command">command</glossary> when a <message tag="resizeControl">resizeControl</message> or <message tag="moveControl">moveControl</message> <keyword tag="message box">message</keyword> is sent. This means that when you move or resize a <keyword tag="control">control</keyword> in the <glossary tag="development environment">development environment</glossary>, its stored Geometry baseline is normally updated automatically.</p><p/><p>Normally, you do not need to use the <b>revCacheGeometry</b> <glossary tag="command">command</glossary> at all, since LiveCode automatically updates the geometry settings when a <keyword tag="control">control</keyword> is moved or resized. However, if you move or resize <glossary tag="control">controls</glossary> manually or in a <glossary tag="handler">handler</glossary>, and the <message tag="resizeControl">resizeControl</message> or <message tag="moveControl">moveControl</message> <keyword tag="message box">message</keyword> is not sent, you may need to use the <b>revCacheGeometry</b> <glossary tag="command">command</glossary> to update the baseline positions.</p><p/><p>To update the settings, use the following statement in a handler or the message box, before changing cards or resizing the window:</p><p/><p>  revCacheGeometry</p><p/><p><img src="202653"/> <b>Important!</b> The <b>revCacheGeometry</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Geometry library">Geometry library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure that "Geometry Library" is selected in the list of script libraries.</p><p/><p><b>Note:</b> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Geometry library">Geometry library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>revCacheGeometry</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>revCacheGeometry</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>