lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Title: Bericht
Dear All,
 
this post is a continuation on my original post, as can be found in Lua Digest, Vol 110, Issue 2, item 6.
 
the original problem of:
 
mywidget1 = widget.create(100,100,10,10)
mywidget2 = widget.create(110,110,20,20)
 
function mywidget1:leftclick
print("left click widget 1")
end
 
function mywidget2:leftclick
print("left click widget 2")
end
 
Is now solved by the solution provided by mr ge Weijers (see Lua Digest, Vol 110, Issue 2, item 20).
 
However, this requires me to call functions on the widget in the form:
 
widget.func(mywidget1,funcparam)
 
(refer to the file LUA widget test.lua as posted by mr Weijers)
 
But I want:
 
mywidget1:func(funcparam)
 
I'm unable to modify the sample provided by mr Weijers so this syntactic sugar works....(the samples provided on the Lua books, work, but then I have the original problem back again.
 
Any hints appreciated
 
Regards,
 
Max