×

Discussion Board

Page 1 of 6 123456 LastLast
Results 1 to 15 of 81
  1. #1
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    PyS60 [1.9.7] Tests and Feedback

    Please use this thread for feedback related to PyS60 1.9.7 release.
    Pankaj Nathani
    www.croozeus.com

  2. #2
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: PyS60 [1.9.7] Tests and Feedback

    Hi !

    I have some questions regarding the new feature:

    Two new APIs are added to canvas - begin_redraw and end_redraw. These can be used to instruct the window server to enable redraw drawing on the canvas UI control.
    My strategy is based on double screen buffer (some parts omitted):

    Code:
    class MyCanvas:
        def __init__():
            self.scr_buf = graphics.Image.new((x,y))
            self.body = Canvas(redraw_callback = self.stats_canvas_redraw,...)
            #...
    
        def stats_canvas_redraw(self,rect=None):
            # called from canvas, when necessary. 
            # Just a blit since I am using a double buffer strategy via self.scr_buf
            self.body.blit(self.scr_buf)
    
        def stats_buffer_redraw(self,rect=None):
            # called from my app, when necessary
            self.scr_buf.clear((255,255,255))
            # any drawing stuff here
            # ...
            self.stats_canvas_redraw()
    The problem here is related to concurrent call to stats_canvas_redraw() since we did not have a way to signalize that a redrawing was in progress. We could have calls from canvas API and from my own app. Making intersection minimum (just a blit) seemed to reduce/eliminate this problem.

    So, the idea behind begin_redraw and end_redraw is just to solve this problem ?

    I changed the code to something like:

    Code:
        def stats_buffer_redraw(self,rect=None):
            self.body.begin_redraw()
            self.scr_buf.clear((255,255,255))
            # any drawing stuff here
            # ...
            self.stats_canvas_redraw()
            self.body.end_redraw()
    This way, is the concurrent call to redraw eliminated ?
    Last edited by marcelobarrosalmeida; 2009-08-05 at 17:53.

  3. #3
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: PyS60 [1.9.7] Tests and Feedback

    Hi

    In XM5800, when I try to use the camera, rotation events are not properly handled. I mean, if I rotate the phone, image received in callback function is not rotated. Moreover, the image is smaller than canvas (documentation states that The default size is the same as the application's main pane size).

    Problems or some misunderstanding ?

    Code:
    import appuifw
    import camera
    import graphics
    
    appuifw.app.directional_pad = False
    
    def cb(im):
        appuifw.app.body.blit(im)
    
    appuifw.app.body=appuifw.Canvas()
    camera.start_finder(cb)
    It seems related to the following issue: http://discussion.forum.nokia.com/fo...t=start_finder

  4. #4
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    114

    Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by marcelobarrosalmeida View Post

    So, the idea behind begin_redraw and end_redraw is just to solve this problem ?

    I changed the code to something like:

    Code:
        def stats_buffer_redraw(self,rect=None):
            self.body.begin_redraw()
            self.scr_buf.clear((255,255,255))
            # any drawing stuff here
            # ...
            self.stats_canvas_redraw()
            self.body.end_redraw()
    This way, is the concurrent call to redraw eliminated ?
    I'm afraid this does not solve _that_ problem.

    If you look at the documentation(3.1.10) -

    The window server caches drawing operations in the redraw store. Delimiting drawing with begin_redraw()/end_redraw() allows window server to efficiently manage drawing operations.

    If applications perform drawing operations outside begin_redraw/end_redraw, window server cannot cull drawing operations from its cache of drawing operations, because it cannot know whether a set of drawing operations has been superceded by a new set. In this scenario every frame of drawing that is done on a non-redraw drawing window will become slower and slower as it draws all the drawing operations for the entire history of the window (well actually up until the last begin_redraw/end_redraw for the whole window).

    If an application performs begin_redraw/end_redraw, it tells the window server that it can throw away any old drawing operations it had for the area of the window specified in the redraw, thus allowing for more optimal management of drawing operations.
    In the "stats_buffer_redraw" method, by adding the begin_redraw and end_redraw you are telling the window server to discard all the old drawing operations it cached the last time this method was called. If you are only updating a portion of the screen then you can specify that rect in the begin_redraw function. This way the window server will only bother about redrawing that rect and not the whole window.

    If you take a look at Scribble we are only updating a few pixels every time a touch event occurs. So we pass the rect surrounding the line/point drawn and the window server will only update that area and in addition it will not cache the draw operations. Without the begin/end redraw there was an exponential performance degradation as the canvas(window server) updates increased.
    import antigravity

  5. #5
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by ashwinurao View Post
    I'm afraid this does not solve _that_ problem..
    Hum...It is only related to performance, not to critical sections. I had read the doc, but I think I was imagining more than was actually written there.

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: PyS60 [1.9.7] Tests and Feedback

    installing python runtime is fine. installing 1.9.7_unsigned_devcert (after signing) messes up my phone random apps disappear from my menu!! aaand, the shell dies in interactive mode
    i'm going back to 1.9.5 ...
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  7. #7
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    114

    Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by the86hitman View Post
    installing python runtime is fine. installing 1.9.7_unsigned_devcert (after signing) messes up my phone random apps disappear from my menu!! aaand, the shell dies in interactive mode
    i'm going back to 1.9.5 ...
    Did you try installing any other flavor of ScriptShell? You can try the PythonScriptShell_1.9.7_high_capas.sis which can be used for APIs requiring Location as well as Read/WriteDeviceData (location and positioning modules).
    import antigravity

  8. #8
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by ashwinurao View Post
    Did you try installing any other flavor of ScriptShell? You can try the PythonScriptShell_1.9.7_high_capas.sis which can be used for APIs requiring Location as well as Read/WriteDeviceData (location and positioning modules).
    i tried high_capas just after posting my message. it did the same thing. anyway, I'm back to 1.9.5 now and restored my apps back to their normal folders in the menu - I'm happy at least i know this previous version safe for my phone!
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  9. #9
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: PyS60 [1.9.7] Tests and Feedback

    I had my key bindings disabled after using begin_redraw() and end_redraw(). I had some bindings related to navi keys but they stopped to work after a redraw with begin_redraw() and end_redraw() (like in fist post in this thread).

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

    Re: PyS60 [1.9.7] Tests and Feedback

    Do I understand correctly that PyS60 1.9.7 documentation is available ONLY online? That there is no offline, local, on my harddisk documentation available at all?

    Major defect, if that is the case.

    First you drop PDF, now local HTML files.. Won't dare to think what next

    Cheers,

    --jouni desperately searching for docs, soon going to install wget

  11. #11
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: PyS60 [1.9.7] Tests and Feedback

    hello all

    have any body tried installing the unsigned scriptshell after signing it through a devcert or symbian signed successfully.

  12. #12
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by gaba88 View Post
    hello all

    have any body tried installing the unsigned scriptshell after signing it through a devcert or symbian signed successfully.
    i did, but i mentioned my issue above, some others have been unable to install..
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  13. #13
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: PyS60 [1.9.7] Tests and Feedback

    hello the86Hitman

    i am also unable to install the unsigned version after signing it.

    am i missing something??

    thanks

  14. #14
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by JOM View Post
    Do I understand correctly that PyS60 1.9.7 documentation is available ONLY online? That there is no offline, local, on my harddisk documentation available at all?
    I am afraid there isn't offline documentation for 1.9.7! It just points to the online docs.

    Quote Originally Posted by gaba88 View Post
    i am also unable to install the unsigned version after signing it.
    Seems to work well for me. Dev cert signing on Nokia 6220c.
    Pankaj Nathani
    www.croozeus.com

  15. #15
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Wink Re: PyS60 [1.9.7] Tests and Feedback

    Quote Originally Posted by gaba88 View Post
    am i missing something??
    May be you should post the error message that you get while installing?
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. PyS60 [1.9.6] Tests and Feedback
    By croozeus in forum Symbian
    Replies: 48
    Last Post: 2009-08-06, 08:09
  2. PyS60 [1.9.5] Tests and Feedback
    By marcelobarrosalmeida in forum Symbian
    Replies: 32
    Last Post: 2009-06-22, 16:40
  3. PyS60[1.9.4] Tests and Feedback
    By tvijayan in forum Symbian
    Replies: 69
    Last Post: 2009-05-22, 00:53
  4. [PyS60 1.9.3] Tests and Feedback
    By croozeus in forum Symbian
    Replies: 24
    Last Post: 2009-04-17, 20:57
  5. [PyS60 1.9.0] Tests and Feedback
    By cyke64 in forum Symbian
    Replies: 107
    Last Post: 2009-02-18, 20:10

Posting Permissions

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