Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lua Development Tools » Lua Function Templates query
Lua Function Templates query [message #873496] Fri, 18 May 2012 11:16 Go to next message
Stuart Lindborg is currently offline Stuart Lindborg
Messages: 4
Registered: May 2012
Junior Member
Hi,

I have moved from LuaEdit to LDT and have a similar issue now that I had in LE.


Due to the platform that my Lua code runs in the functions are called self:<name>() as such the template can't cope with the : in there Sad How do I edit the template to factor in the self: part of each function?

Thanks

Stuart
Re: Lua Function Templates query [message #873632 is a reply to message #873496] Fri, 18 May 2012 18:09 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin Cabé
Messages: 151
Registered: July 2009
Location: Toulouse, France
Senior Member

Hi Stuart,
Would you mind sharing a couple lines of the code where you'd like to use a template? I am not sure I get what you are looking for (and I am not sure that templates are the best way to go for what seems to be your use case)

Thanks!
Re: Lua Function Templates query [message #874215 is a reply to message #873632] Sun, 20 May 2012 07:14 Go to previous messageGo to next message
Stuart Lindborg is currently offline Stuart Lindborg
Messages: 4
Registered: May 2012
Junior Member
function self:onPlayTrack ()

code

end

As far as I'm aware it must be coded like this for the target, but I can do some testing on Monday to see if it really needs the self: part
Thanks
Re: Lua Function Templates query [message #881472 is a reply to message #874215] Mon, 04 June 2012 16:16 Go to previous message
Simon Bernard is currently offline Simon Bernard
Messages: 287
Registered: July 2009
Senior Member
Hi Stuart,
You could create your own template in Windows/Preferences/Lua/Editor/Templates.

For your sample of code, you can try to add a new "selffunction" template with this pattern :
function self:${name}(${parameters})
	${cursor}
end


Hope this help.
Previous Topic:Debugger timeout on 3.7.2, Windows 7 x64
Next Topic:Code Assist prototype feedback
Goto Forum:
  


Current Time: Sun Oct 26 07:44:39 GMT 2014

Powered by FUDForum. Page generated in 0.01681 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software