View Single Post
09/04/15, 08:55 AM   #47
Wandamey
Guest
Posts: n/a
Originally Posted by Baertram View Post
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:
  1. 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

Last edited by Wandamey : 09/04/15 at 09:06 AM.
  Reply With Quote