Difference between revisions of "Help (API)"
From ComputerCraft Wiki
(Updated to API overview v2) |
(Add return column, use type template, and update descriptions) |
||
Line 2: | Line 2: | ||
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | ||
− | <tr><td colspan=" | + | <tr><td colspan="3" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> |
[[File:Grid_disk.png|24px]] | [[File:Grid_disk.png|24px]] | ||
Help (API) | Help (API) | ||
</td></tr> | </td></tr> | ||
− | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Method Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> | + | <tr><td style="width: 100px; background: #E0E0E0; padding: .4em; font-weight:bold;">Return</td><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Method Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> |
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.path]]()</td> | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|string}} path</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.path]]()</td> |
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the list of locations the API will look in for help files.</td></tr> | ||
− | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.setPath]]( | + | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[nil]]</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.setPath]]({{Type|string}} path)</td> |
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the list of locations the API will look in for help files.</td></tr> | ||
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.lookup]]( | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|string}} path, or [[nil]]</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;"> | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.lookup]]({{Type|string}} topic)</td> |
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the path to the file containing the help page for <var>topic</var>, or [[nil]] if the topic cannot be found.</td></tr> | ||
− | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.topics]]()</td> | + | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|table}} topics</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[help.topics]]()</td> |
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a list of all available help topics.</td></tr> | ||
Line 26: | Line 30: | ||
[[Category:APIs]] | [[Category:APIs]] | ||
+ | td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the list of locations the API will look in for help files. |
Revision as of 19:53, 23 April 2013
The Help API allows you to mess around with the help files.
Return | Method Name | Description |
string path | help.path() | Returns the list of locations the API will look in for help files. |
nil | help.setPath(string path) | Sets the list of locations the API will look in for help files. |
string path, or nil | help.lookup(string topic) | Returns the path to the file containing the help page for topic, or nil if the topic cannot be found. |
table topics | help.topics() | Returns a list of all available help topics. |
td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the list of locations the API will look in for help files.