Lokasenna Notes
7.06 Lokasenna Notes:
I saw this somewhere in the Lokasenna documentation:
Functions can be declared 'local' if they are called (directly) by Lokasenna GUI, e.g., clicking a button. If called from within another function they must be global (no 'local') or it crashes script.
Example: my_function called from a button click.
local function Button01_Click()
    my_function()
end

-- If this is declared as local it crashes script.
function my_function()
    -- do stuff --
end
What I have found is that "local my_function( )" works if it is defined before the "Button01_Click" function definition.
local function my_function()
    -- do stuff --
end

local function Button01_Click()
    my_function()
end


Normally, menubar items provides for assigning a function to be called when clicking on a menu item. dh_ThemeDesigner overrides the mouseup event to allow for declaring parameters within the menu definition to be passed along with the function.



The text element classes dh_Listbox, dh_Textbox, and dh_TextEditor provide for highlighting selected text. As a default they use the color and alpha value of the GUI color "sel_txt". For a more detailed explanation see  3.08 Selected Text Highlights.