Download
(29 Kb)
Download
Updated: 07-07-12 03:42 PM
Pictures
File Info
Updated:07-07-12 03:42 PM
Created:10-13-11 03:39 PM
Downloads:881
Favorites:3
MD5:
LuaPad
Version: 1.9
by: NerfedWar [More]
Provides a simple in-game environment to run LUA code. Primary use is to support a series of Rift addon development tutorials.

Code:
/luapad
or

Code:
/lp
will bring up the interface.

Enter your Lua into the 'code' text field. Click 'Run' to execute your code.

Click the Inspect button to dump the contents of any Lua table/function/variable.

Store your code in one of the snippet containers.
Optional Files (0)


Archived Files (5)
File Name
Version
Size
Author
Date
1.7
29kB
NerfedWar
07-07-12 02:40 PM
1.6
29kB
NerfedWar
07-05-12 03:38 PM
1.1.0
29kB
NerfedWar
10-19-11 04:10 PM
1.1.0
9kB
NerfedWar
10-15-11 09:59 AM
1.0.1
9kB
NerfedWar
10-13-11 03:39 PM


Post A Reply Comment Options
Unread 03-22-13, 05:02 PM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Finally got around to fixing my local copy of this today - the Key events changes in 2.2 broke the edit window.

Code:
	function inputField.Event:KeyDown(button)
		local txt = inputField:GetText()
		local pos = inputField:GetCursor()
		-- split txt into two by pos
		local txtPre = string.sub(txt, 0, pos)
		local txtPost = string.sub(txt, pos+1)
		inputField:SetKeyFocus(true) 
		if button == "Return" then
			inputField:SetText(txtPre.."\n"..txtPost)
			inputField:SetSelection(pos,pos+1)
		elseif button == "Tab" then
			inputField:SetText(txtPre.."\t "..txtPost)
			inputField:SetSelection(pos+1,pos+2)
		end	
		
		-- resize inputField
		_, count = string.gsub(inputField:GetText(), "\r", "\r")
		local t = inputField:GetText()
		inputField:SetHeight(math.max(14*(count), 300))
	end
adelea is offline Report comment to moderator  
Reply With Quote
Unread 07-07-12, 02:52 PM  
NerfedWar
Zombie
 
NerfedWar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 45
Uploads: 8
Quote:
Originally Posted by Thorarin
Thanks for the update

Unfortunately, the Inspector doesn't seem to work for me as I would expect.
While typing the variable name (say "myTable.myKey") it will inspect myTable, but after that the screen no longer updates. Pressing the Inspect button has no effect either.

The only way I can get it to update is to press backspace until it reads "myTabl" (no e), which will then display nil
oops sorry about that. Fixed it and a few other bugs in the new 1.7 release.
NerfedWar is offline Report comment to moderator  
Reply With Quote
Unread 07-06-12, 05:54 AM  
Thorarin
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 68
Uploads: 1
Thanks for the update

Unfortunately, the Inspector doesn't seem to work for me as I would expect.
While typing the variable name (say "myTable.myKey") it will inspect myTable, but after that the screen no longer updates. Pressing the Inspect button has no effect either.

The only way I can get it to update is to press backspace until it reads "myTabl" (no e), which will then display nil
Thorarin is offline Report comment to moderator  
Reply With Quote
Unread 10-20-11, 01:18 PM  
NerfedWar
Zombie
 
NerfedWar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 45
Uploads: 8
Re: Re: Re: Bug

Quote:
Originally posted by RagebeastRT
It was when I typed the ":" right after it that it started spewing errors and each time I added a character after it. My intent was to type RunecraftHelper:window.
Ahh the colon! :... that was a bit of an oversight of mine. Many thanks for explanation. You did mention the : in your original message, my mistake.
Last edited by NerfedWar : 10-20-11 at 01:19 PM.
NerfedWar is offline Report comment to moderator  
Reply With Quote
Unread 10-20-11, 07:58 AM  
RagebeastRT
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 118
Uploads: 8
Re: Re: Bug

Quote:
Originally posted by NerfedWar
tks RagebeastRT.

The inspector window automatically performs a lookup each time you change what is in the input field. If you call a function with it and pass the wrong parameters, or call a function that doesn't exist by adding braces() then the lua-engine will throw an error as expected. I agree this is not the best solution and have a new version in the works that will trap these errors and not display them.

I cannot replicate your error though. If I install RunecraftHelper and type RunecraftHelper in the Inspector all I get is RunecraftHelper=nil. Can you provide more details?
It was when I typed the ":" right after it that it started spewing errors and each time I added a character after it. My intent was to type RunecraftHelper:window.
RagebeastRT is offline Report comment to moderator  
Reply With Quote
Unread 10-19-11, 11:41 PM  
NerfedWar
Zombie
 
NerfedWar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 45
Uploads: 8
Re: Bug

Quote:
Originally posted by RagebeastRT
Tried this out today. In the inspector window, I started typing RunecraftHelper: and that was as far as I got when the chat loaded with errors.
tks RagebeastRT.

The inspector window automatically performs a lookup each time you change what is in the input field. If you call a function with it and pass the wrong parameters, or call a function that doesn't exist by adding braces() then the lua-engine will throw an error as expected. I agree this is not the best solution and have a new version in the works that will trap these errors and not display them.

I cannot replicate your error though. If I install RunecraftHelper and type RunecraftHelper in the Inspector all I get is RunecraftHelper=nil. Can you provide more details?
Last edited by NerfedWar : 10-20-11 at 02:23 AM.
NerfedWar is offline Report comment to moderator  
Reply With Quote
Unread 10-19-11, 05:18 PM  
RagebeastRT
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 118
Uploads: 8
Bug

Tried this out today. In the inspector window, I started typing RunecraftHelper: and that was as far as I got when the chat loaded with errors.
RagebeastRT is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: