View Single Post
06-11-21, 08:54 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
You are indeed.

The script handler gets passed a parameter (self) (the widget) and you then pass it on to your function by declaring function(self)... end for the script to call.

The "self" in the function declaration is more convention, it could be anything
Code:
function(frame) print(frame:GetName()) end
Code:
function(myWidget) print(myWidget:GetName()) end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 06-11-21 at 09:05 PM.
  Reply With Quote