gui.destroy

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

gui.destroy

richardereyes
I read that this problem was solved but it is happening to me, I used
2.0b6 and 2.0b7 and I got the same result.

If you call gui.destroy() then if you use Print() or try to draw
using screen.line etc nothing appears in the screen, only controls
are drawn (fields, labels, list, etc)

Here is an example:


gui.destroy()
screen.moveto(10,40)
print("Hello world!!!")
screen.line(10,80,150,150)

while 1 do
 local e= gui.event()
 if (e==penDown) then
  break
 end
end


if I comment the line with gui.destroy() the text and the line do
appear, is any way to avoid this?

regards,
Richard




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

RE: gui.destroy

Emil Tchekov-3
Hi,


I am allways using ".destroy" with following ".clear"

Can you test the behaviour with .clear added?
May be this will help...

Regards

Emil

--- richardereyes <[hidden email]> schrieb:

> I read that this problem was solved but it is
> happening to me, I used
> 2.0b6 and 2.0b7 and I got the same result.
>
> If you call gui.destroy() then if you use Print() or
> try to draw
> using screen.line etc nothing appears in the screen,
> only controls
> are drawn (fields, labels, list, etc)
>
> Here is an example:
>
>
> gui.destroy()
> screen.moveto(10,40)
> print("Hello world!!!")
> screen.line(10,80,150,150)
>
> while 1 do
>  local e= gui.event()
>  if (e==penDown) then
>   break
>  end
> end
>
>
> if I comment the line with gui.destroy() the text
> and the line do
> appear, is any way to avoid this?
>
> regards,
> Richard
>
>
>
>
>  
> Yahoo! Groups Links
>
>
>
>
>
>



               
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

RE: gui.destroy

richardereyes
no, it doesn´t work...
   
  Thanks,
  Richard

Emil Tchekov <[hidden email]> wrote:
          Hi,

I am allways using ".destroy" with following ".clear"

Can you test the behaviour with .clear added?
May be this will help...

Regards

Emil

--- richardereyes <[hidden email]> schrieb:

> I read that this problem was solved but it is
> happening to me, I used
> 2.0b6 and 2.0b7 and I got the same result.
>
> If you call gui.destroy() then if you use Print() or
> try to draw
> using screen.line etc nothing appears in the screen,
> only controls
> are drawn (fields, labels, list, etc)
>
> Here is an example:
>
>
> gui.destroy()
> screen.moveto(10,40)
> print("Hello world!!!")
> screen.line(10,80,150,150)
>
> while 1 do
> local e= gui.event()
> if (e==penDown) then
> break
> end
> end
>
>
> if I comment the line with gui.destroy() the text
> and the line do
> appear, is any way to avoid this?
>
> regards,
> Richard
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>


__________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


         

 
---------------------------------
Everyone is raving about the  all-new Yahoo! Mail.

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

resource.draw

manu_ma
I experienced some problems with resource.draw.
It works fine with resource contained within the file (or from system file
"Boot"), but it doesn't work if the resource is opened from an external
file. The resource is opened, you can read its size, but resource.draw
dispays nothig.
This applies to release 2.0b7, too. I have a Treo 650.
 
Anyway, I discovered that if you simply add a command "gui,.event" before
resource.draw, it works!
Something like:
r = resource.open("Tbmp", 1100, "Myfile")
gui.event(1) -- if you don't insert this line it doesn't work
resource.draw(r)
<http://geo.yahoo.com/serv?s=97359714/grpId=7420468/grpspId=1705006764/msgId
=3611/stime=1162301997/nc1=3848641/nc2=4044343/nc3=3>  
 
Mario


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

a lot of small bitmaps - what is the best solution ?

manu_ma
In reply to this post by richardereyes
I'm developing an application for card games and I need to insert the
bitmaps of all cards. This means quite a lot of small pictures.
I use them with "resource.draw". The graphic capabilities of gui.button
would be useful, too.
The application is quite big, so it's splitted in 3 parts to avoid the limit
of 64k.
 
I'd like to put them all together in a separate file, maybe a stream file,
but how can I manage them to be packed in one file ? (52 stream files
wouldn't be practical).
 
Actually, I compile them in a separate lua library (using pilrc) and use
them with "resource.open("Tbmp", id, "MyLib"), but I didn't find a way to
use them with gui.button.
 
What do you think is the best way to insert the pictures ?
 
Regards
 
Mario


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

Re: resource.draw

migueletto
In reply to this post by manu_ma
Hi,

> I experienced some problems with resource.draw.
> It works fine with resource contained within the file (or from
system file
> "Boot"), but it doesn't work if the resource is opened from an external
> file. The resource is opened, you can read its size, but resource.draw
> dispays nothig.
> This applies to release 2.0b7, too. I have a Treo 650.

This problem will be fixed in the next release. It is the same problem
that makes some screen functions fail after gui.destroy().

Regards,
Marcio.




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

Re: a lot of small bitmaps - what is the best solution ?

migueletto
In reply to this post by manu_ma
Hi,

> I'm developing an application for card games and I need to insert the
> bitmaps of all cards. This means quite a lot of small pictures.
> I use them with "resource.draw". The graphic capabilities of gui.button
> would be useful, too.
> The application is quite big, so it's splitted in 3 parts to avoid
the limit
> of 64k.
>  
> I'd like to put them all together in a separate file, maybe a stream
file,
> but how can I manage them to be packed in one file ? (52 stream files
> wouldn't be practical).

Stream files can not be used to store resources, since PalmOS can read
 resources only from resource databases.

> Actually, I compile them in a separate lua library (using pilrc) and use
> them with "resource.open("Tbmp", id, "MyLib"), but I didn't find a
way to
> use them with gui.button.

You could try something like this:

f = io.open("MyLib")
b1 = gui.button("", id1)
b2 = gui.button("", id2)
b3 = gui.button("", id3)
f:close()

Regards,
Marcio.




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply | Threaded
Open this post in threaded view
|

Re: a lot of small bitmaps - what is the best solution ?

Bugzilla from ibelcomputing@yahoo.com.mx
> You could try something like this:
>
> f = io.open("MyLib")
> b1 = gui.button("", id1)
> b2 = gui.button("", id2)
> b3 = gui.button("", id3)
> f:close()
>
> Regards,
> Marcio.
>
The version for this code is openfile("BMP","r")? Because i'm getting
a "bad file descriptor" error.