[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: function call in table with reference
- From: Philipp Kraus <philipp.kraus@...>
- Date: Fri, 23 Aug 2013 12:42:35 +0200
Hello,
I'm using something like this
mytab = {
func1 = function(…) do something end
func2 = function(…) do something other
}
I can call the functions with mytab.func1(), but I would like to use a reference to the table itself (like the self parameter on Python classes):
mytab = {
func1 = function(self, …) do something end
func2 = function(self, …) do something other
}
and self should be point to mytab. How can I do this?
Thanks a lot
Phil