Search found 1 match

by Starnub
Thu Nov 07, 2019 6:28 am
Forum: Support and Development
Topic: Passing a 'self' function as a parameter
Replies: 4
Views: 668

Passing a 'self' function as a parameter

I'm not really sure how to word this properly, but what I want to do is pass a function that requires the self argument to another outside function. Say I have a Button object: local button = {} button.__index = button function newButton(f) return setmetatable({function = f}, button) end function bu...