From 45f3cba3b420ebc1b3ba793f3a609d8c5447a5ce Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Dec 2009 19:48:45 -0800 Subject: Fixing the hexviewer's crash, and helping its dynamic refresh a bit. --- dalos.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dalos.lua') diff --git a/dalos.lua b/dalos.lua index fbaf76a..3400aaa 100644 --- a/dalos.lua +++ b/dalos.lua @@ -547,6 +547,7 @@ dalosp.object = { set_houtput = dalosp.object.set_houtput, houtputs = {}, get_linked_input = dalosp.object.get_linked_input, + dcanvas = dcanvas, } if tab.otype and not tab.c then @@ -595,11 +596,13 @@ dalosp.hexview = { if not h then self.color = cd.YELLOW hv:updatehandle(nil) + self.dcanvas:draw() return end if not h:canread() or not h:canseek() then self.color = cd.RED hv:updatehandle(nil) + self.dcanvas:draw() return end self.color = cd.GREEN @@ -608,6 +611,7 @@ dalosp.hexview = { self.oldcursors[i] = -1 end hv:updatehandle(h) + self.dcanvas:draw() end, configure = function (self) @@ -660,7 +664,7 @@ dalosp.hexview = { self.got_eof = false - local r = self.lh:read(count, userdata) + local r = self.h:read(count, userdata) self.offset = self.offset + r if r == 0 then self.got_eof = true end return r -- cgit v1.2.3