You Are Here:

Community: Developer Discussion Boards

#1 Old canvas bug - 2008-03-31, 14:16

Join Date: Mar 2008
Posts: 57
nokia_e70
Offline
Regular Contributor
I thought the "bug" in the title may focus the mods' attention, because most other threads mostly pass them by

The canvas displays before it's assigned to app.body, but not covering the whole screen. When I create another "legitimate" canvas (assigned to app.body) it's obscured by the old one. The unassigned canvas doesn't dissapear even when I return to python shell.

Besides, am I allowed to have many canvas instances ? The docs isn't clear on that. For now something like this does the trick:

Code:
import appuifw as a

#an object with it's own canvas
class myObject:

  def __init__(self):
    self.canvas = a.Canvas()
    cached_body = a.app.body  #\
    a.app.body = self.canvas  #- needed (shouldn't be?)
    a.app.body = cached_body  #/

  def show(self):
    a.app.body = self.canvas
Last edited by nokia_e70 : 2008-03-31 at 17:52.
Reply With Quote

#2 Old Re: canvas bug - 2008-03-31, 14:25

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by nokia_e70 View Post
The canvas displays before it's assigned to app.body, but not covering the whole screen. When I create another "legitimate" canvas (assigned to app.body) it's obscured by the old one. The unassigned canvas doesn't dissapear even when I return to python shell.
I've also noticed that whenever I created canvas, it almost immediately trickered redraw_callback. That's why I create body first, then canvas. Maybe you should do same

Btw thanx for the tip about "unassigned canvas" description! I think this might have happened, when I experimented with built-in debugging! Have to check this evening!

Quote:
Besides, am I allowed to have many canvas instances ? The docs isn't clear on that.
This might be a good time to download pys60 source code...

Cheers,

--jouni
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
bug in Canvas, Series 60? lukaszem Mobile Java General 8 2005-12-14 22:40
possible bug in canvas implementation gojkoa Python 2 2005-11-21 09:54
i think i have got a full canvas bug michael.whittle Mobile Java General 1 2004-01-04 09:30
i think i have got a full canvas bug michael.whittle Mobile Java General 0 2004-01-03 18:45
Major problem with delegation to Canvas bartekn Mobile Java Media (Graphics & Sounds) 8 2003-10-08 18:46

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia