Difference between revisions of "Help (API)"

From ComputerCraft Wiki
Jump to: navigation, search
m (moved HELP to Help (API))
 
(12 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
The Help API allows you to mess around with the help files.
 
The Help API allows you to mess around with the help files.
  
Its functions are:
+
{{API table|Help|image=Grid disk.png|2=
{| border="1" cellpadding="2" cellspacing="0"
+
 
!style="background:#EEE" width="200px"|Method name
+
{{API table/row
!style="background:#EEE" width="*"|Description
+
|[[help.path]]()|{{Type|string}} path
|-
+
|Returns the list of locations the API will look in for help files.
|help.setPath( path )
+
|odd}}
|<no description given>
+
 
|-
+
{{API table/row
|help.lookup( topic )
+
|[[help.setPath]]({{type|string}} path)|{{Type|nil}}
|<no description given>
+
|Sets the list of locations the API will look in for help files.
|-
+
|}}
|help.topics()
+
 
|<no description given>
+
{{API table/row
|}
+
|[[help.lookup]]({{Type|string}} topic)|{{Type|string}}/{{type|nil}} path
 +
|Returns the path to the file containing the help page for <var>topic</var>, or {{type|nil}} if the topic cannot be found.
 +
|odd}}
 +
 
 +
{{API table/row
 +
|[[help.topics]]()|{{Type|table}} topics
 +
|Returns a list of all available help topics.
 +
|}}
 +
 
 +
{{API table/row
 +
|[[help.completeTopic]]({{Type|string}} topic prefix)|{{Type|table}} topic suffixes
 +
|Returns a list of suffixes that can be concatenated with the prefix to get valid topic titles. ''Requires CC 1.74 or later.''
 +
|odd}}
 +
 
 +
}}
 +
 
 +
 
 
[[Category:APIs]]
 
[[Category:APIs]]

Latest revision as of 05:56, 31 July 2015

The Help API allows you to mess around with the help files.

Grid disk.png  Help (API)
Function Return values Description
help.path() string path Returns the list of locations the API will look in for help files.
help.setPath(string path) nil Sets the list of locations the API will look in for help files.
help.lookup(string topic) string/nil path Returns the path to the file containing the help page for topic, or nil if the topic cannot be found.
help.topics() table topics Returns a list of all available help topics.
help.completeTopic(string topic prefix) table topic suffixes Returns a list of suffixes that can be concatenated with the prefix to get valid topic titles. Requires CC 1.74 or later.