2,736
edits
Red Leader (talk | contribs) (→removelistener(): Oops, forgot source links) |
Red Leader (talk | contribs) (→resolvepath(): Finish docing) |
||
| Line 1,989: | Line 1,989: | ||
=== resolvepath() === | === resolvepath() === | ||
{{Nasal doc | |||
|syntax = resolvepath(path); | |||
|source = {{flightgear file|src/Scripting/NasalSys.cxx|l=604|t=Source}} | |||
|text = Takes a relative path as a string and uses [[SimGear]]'s path-resolving framework to return an absolute path as a string. If the path could not be resolved, an empty string is returned. See [[Resolving Paths]] for a detailed description of the algorithm. | |||
|param1 = path | |||
|param1text = Relative path to be completed. | |||
|example1 = print(resolvepath("Nasal/globals.nas")); # prints the equivalent of $FG_ROOT/Nasal/globals.nas | |||
|example2 = print(resolvepath("blah")); # prints nothing; could not be resolved | |||
}} | |||
} | |||
=== setlistener() === | === setlistener() === | ||