- New Objects (Flexbox, Graph, Treeview) - Pluginsystem to add/remove functionality - Reworked the entire Object system, instead of one big Object Class we have multiple classes: Object, VisualObject, ChangeableObject - Instead of one big Frame Class we have multiple Frame Classes: BaseFrame, Frame, MovableFrame, ScrollableFrame, MonitorFrame, Flexbox - Removed the Animation Object, and added a animation plugin instead - Removed the Graphic Object and merged it's functionality with the image object - Updated currently existing objects
923 B
923 B
onDone
Description
onDone(self, err)
This is a custom event which gets triggered as soon as the program has finished.
Returns
objectThe object in use
Usage
local basalt = require("basalt")
local main = basalt.createFrame()
local aProgram = main:addProgram():execute("rom/programs/shell.lua")
local function onProgramDone(self, err)
if err then
basalt.debug("Program finished with error:", err)
else
basalt.debug("Program has finished successfully")
end
end
aProgram:onDone(onProgramDone)
In this example, a Program object is created, added to the mainFrame, and the "rom/programs/shell.lua" script is executed. The onDone event is then attached to the program, and it will be triggered when the program finishes. The event function, onProgramDone, will print a debug message indicating whether the program finished successfully or with an error.