Difference between revisions of "ArgumentType"

From The Foundry MODO SDK wiki
Jump to: navigation, search
(More Information)
(Redirected page to Argument Types)
 
Line 1: Line 1:
'''ArgumentType''' is a config construct that provides username and description strings for a choice in a list or popup.  The type string is often associated with [[TextValueHint]] array or a ''list''-style [[User Values|User Value]] to provide user strings for each choice.
+
#redirect [[Argument Types]]
 
+
== Creating an ArgumentType Config Entry ==
+
 
+
The ''AlignWithEdgeTypes-mode'' entry would exist in a CommandHelp block in a config file, and might look this:
+
 
+
<atom type="CommandHelp">
+
  <hash type="ArgumentType" key="AlignWithEdge-mode@en_US">
+
    <atom type="UserName">Align With Edge</atom>
+
    <hash type="Option" key="top">
+
      <atom type="UserName">Top</atom>
+
      <atom type="Desc">Top edge</atom>
+
    </hash>
+
    <hash type="Option" key="bot">
+
      <atom type="UserName">Bottom</atom>
+
      <atom type="Desc">Bottom edge</atom>
+
    </hash>
+
    <hash type="Option" key="left">
+
      <atom type="UserName">Left</atom>
+
      <atom type="Desc">Left edge</atom>
+
    </hash>
+
    <hash type="Option" key="right">
+
      <atom type="UserName">Right</atom>
+
      <atom type="Desc">Right edge</atom>
+
    </hash>
+
  </hash>
+
</atom>
+
 
+
The @en_US at the end of the name is the language type, in this case US English, which is also the default fallback for all languages.
+
 
+
The ''Option'' entries identify each option by the internal name given by the list property of the user value, and provides a username and description for each. A username for the entire argument type is also available.
+
 
+
Note that all of the key values are case sensitive.
+
 
+
== More Information ==
+
* [[Config System]]
+
* [[TextValueHints]]
+
* [[User Values]]
+
 
+
[[Category:Configs]]
+

Latest revision as of 17:28, 5 July 2012

Redirect to: