×

Discussion Board

Results 1 to 2 of 2

Thread: canvas bug

  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    canvas bug

    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 16:52.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: canvas bug

    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!

    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

Similar Threads

  1. bug in Canvas, Series 60?
    By lukaszem in forum Mobile Java General
    Replies: 8
    Last Post: 2005-12-14, 21:40
  2. possible bug in canvas implementation
    By gojkoa in forum Symbian
    Replies: 2
    Last Post: 2005-11-21, 08:54
  3. i think i have got a full canvas bug
    By michael.whittle in forum Mobile Java General
    Replies: 1
    Last Post: 2004-01-04, 08:30
  4. i think i have got a full canvas bug
    By michael.whittle in forum Mobile Java General
    Replies: 0
    Last Post: 2004-01-03, 17:45
  5. Major problem with delegation to Canvas
    By bartekn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2003-10-08, 17:46

Posting Permissions

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