webmcp
diff framework/env/trace/_render_sub_tree.lua @ 31:1cd9e69b85cb
add execute.load_chunk(args)
load_chunk loads the content of a lua file and returns the code.
It can construct the path name easily so you can put helper code in
seperate files for DRYness.
load_chunk loads the content of a lua file and returns the code.
It can construct the path name easily so you can put helper code in
seperate files for DRYness.
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Tue Oct 05 02:34:04 2010 +0200 (2010-10-05) |
parents | 0b7e87f2dc91 |
children | 3c12e7dd93e0 |
line diff
1.1 --- a/framework/env/trace/_render_sub_tree.lua Mon Sep 20 20:11:29 2010 +0200 1.2 +++ b/framework/env/trace/_render_sub_tree.lua Tue Oct 05 02:34:04 2010 +0200 1.3 @@ -35,6 +35,18 @@ 1.4 open("debug") 1.5 slot.put(encode.html(node.message)) 1.6 close() 1.7 + elseif node_type == "debug_table" then 1.8 + open("debug") 1.9 + slot.put("<table>") 1.10 + if type(node.message) == "table" then 1.11 + for k, v in pairs(node.message) do 1.12 + slot.put("<tr><td>", encode.html(tostring(k)),"</td><td>", encode.html(tostring(v)), "</td></tr>") 1.13 + end 1.14 + slot.put("</table>") 1.15 + else 1.16 + slot.put("debug_table: not of table type") 1.17 + end 1.18 + close() 1.19 elseif node_type == "traceback" then 1.20 open("debug") 1.21 slot.put('<pre>')