Originally Posted by Baertram
snip
|
i think you should define : in the first example
button.tooltiptext = tooltiptext
-- Edit : and define it here, not in the function btw with
Lua Code:
button.tooltipText = outputFilterState(false, settingsVars.settings.splitFilters, p_FilterPanelId, buttonId, mappingVars.settingsFilterStateToText[tostring(getSettingsIsFilterOn(buttonId, p_FilterPanelId))])
elsewhere you define this
Code:
local function MyFunction(self)
local tooltiptext = self.tooltiptext -- just to keep the same variable and not mix everything up if your function is long like my arm - self here is button, cause it's called from the button
blabla all your code from the anonymous function blabla
end
then for the Handler :
button:SetHandler("OnMouseEnter", MyFunction)
|
now lets the teachers look at the homework