docs update
Updated some docs stuff
This commit is contained in:
19
docs/objects/Program/onDone.md
Normal file
19
docs/objects/Program/onDone.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# onDone
|
||||
|
||||
`onDone(self, err)`<br>
|
||||
This is a custom event which gets triggered as soon as the program has finished.
|
||||
|
||||
Here is a example on how to add a onDone event to your program:
|
||||
|
||||
```lua
|
||||
local basalt = require("basalt")
|
||||
|
||||
local main = basalt.createFrame()
|
||||
local aProgram = main:addProgram():execute("rom/programs/shell.lua")
|
||||
|
||||
local function onProgramDone()
|
||||
basalt.debug("Program has finished")
|
||||
end
|
||||
|
||||
aProgram:onDone(onProgramDone)
|
||||
```
|
||||
Reference in New Issue
Block a user