gui.destroy questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gui.destroy questions

abm0000abm-2
Two questions:

First, if I call gui.destroy() do I need to call screen.clear() either
before or after the gui.destroy() to achieve maximum effect? Or does
gui.destroy() do everything that screen.clear() does?

Second, is the issue regarding not being able to print() still
unfixed? I seem to encounter it, although I am only running on the
Palm OS Simulator v5.1 (with plua 2.0b7) and not an actual hardware
Palm. It appears that I can also can't call gui.label() to any affect
either. Both work fine before any gui.destroy() calls. gui.field works
under all circumstances, though. In the mean time I use:

write = function(string)
        x, y = screen.pos()
        screen.moveto(x, y + 1)
        gui.field(1,1023,1023,string,nil,nil)
end

You move down a pixel because text in fields a pixel above label text
due to the underline (even though nil is passed in for the underline
parameter). I thought 1023 seemed long enough. Doing something with
string.len() seems pointless because the col parameter doesn't really
correspond to character width anyway, since the font is proportional.

Thanks in advance,
Robinson

Reply | Threaded
Open this post in threaded view
|

Re: gui.destroy questions

migueletto
Hi,

--- In [hidden email], someone_stole_gnirts <no_reply@...> wrote:

> First, if I call gui.destroy() do I need to call screen.clear() either
> before or after the gui.destroy() to achieve maximum effect? Or does
> gui.destroy() do everything that screen.clear() does?

gui.clear just clears the screen. gui.destroy destroys all controls
and clears the screen. If you just use low level graphic functions,
like screen.circle, you can use screen.clear. If you use GUI controls
you need gui.destroy.

> Second, is the issue regarding not being able to print() still
> unfixed? I seem to encounter it, although I am only running on the
> Palm OS Simulator v5.1 (with plua 2.0b7) and not an actual hardware
> Palm. It appears that I can also can't call gui.label() to any affect
> either. Both work fine before any gui.destroy() calls.

2.0b7 has some screen drawing bugs, probably related to what you describe.

2.0b8 was 90% ready, but I had to stop working on it around mid
December. Since I still do not have time to work on Plua, maybe I will
release it as-is.

Regards,
Marcio.