×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    PyS60 [1.9.5] Tests and Feedback

    I have already ported my code to 1.9.5. Everything is working and XM5800 is running perfectly with its new scrollbars ! Fantastic ! I Installed this version in E71 and XM 5800. Again, no problems.

    I saw just one setback when creating listbox with icons. I am receiving a KErrNotFound when loading icons. For instance:

    Code:
    from appuifw import *
    import os
    DEFDIR = "e:\\wordmobi\\"
    MIFFILE = "wordmobi2.mif"
    
    mif = unicode(os.path.join(DEFDIR,MIFFILE)) 
    wp_icon = Icon(mif,16398,16398)
    app.body = Listbox([(u"a",u"b",wp_icon)])  # KErrNotFound will happen here
    The mif file exists and I opened it and read all its contents, just to check.

    Am I missing something or should I report it at maemo ? This code was working in 1.9.3 and 1.4.5

    Anyway, I am really happy with scrollbars support ! Thanks, PyS60 team !

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

    Re: PyS60 [1.9.5] Tests and Feedback

    MIF was used only in one platform, 2.6 if I recall right. Anyway, now you should use MBM.

    I've been experimenting with 1.9.5 and have good feelings in general. However there is something weird going on, debugging... In any case best 1.9.x release ever, love scrollbar

    Cheers,

    --jouni

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by JOM View Post
    MIF was used only in one platform, 2.6 if I recall right. Anyway, now you should use MBM.
    Do I need to use MBM ? I thought that MIF was the evolution, allowing scalable icons (tiny SVG format).

    Marcelo

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Does PyS60 1.9.5 somehow cache scripts? I got really weird results from testing...

    I have a script a.py, which I'm debugging on 5800 hardware. I modify the script in PC, copy to device and run directly as a standalone script. No problems. However my (current) debugging system requires running script a.py from within script debug.py - and in this case I do NOT see modifications I made on PC !?!?! Seems like I'm somehow stuck with the original a.py script ?!?!?

    I've seen this kind of weird behaviour only when script.py had been compiled as script.pyc. In those case changes made into script.py were not visible when script.py was run from another script - because actually it was earlier compiled script.pyc which was run from cache...

    Anyway, does anyone have any tips what to do? Script runs ok as a standalone, but is stuck to old version when imported inside another script. How to reset the situation, reboot did not help

    Lost between versions,

    --jouni

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by marcelobarrosalmeida View Post
    Do I need to use MBM ? I thought that MIF was the evolution, allowing scalable icons (tiny SVG format).
    Sure is confusing, SVG-T (vector) was supposed to take over everything (bitmap) - and then didn't. Never heard any reason... actually nobody I knew asked why, just releaved to get rid of SVG for a moment!

    Anyway, to confirm MBM vs MIF:
    file:///C:/Program%20Files/PythonForS60/doc/s60/node23.html

    Note that MBM and MIF (MIF only in S60 2nd Edition FP3) are the only file formats supported.
    ...but there's something more weird. I would guess 5.0 has changed MBM file format and PyS60 didn't update the internal routines. Several built-in MBM icons still look corrupt, but it's the same with 1.4.5 and 1.9.5. Will search a bit...

    Just imaging,

    --jouni

  6. #6
    Registered User
    Join Date
    Aug 2005
    Posts
    13

    Thumbs up Re: PyS60 [1.9.5] Tests and Feedback

    scriptext module is working great on E75 (finally)!
    i can now send a proper MMS message using the Messaging Service, which is receivable by the phone's [Messaging] inbox
    (previously the mms_send of the messaging module produced an invalid formatted message that needs to be re-directed to a MMS retrieval server by the telco..)

    Thanks again for the great work and prompt releases!

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by JOM View Post
    Does PyS60 1.9.5 somehow cache scripts? I got really weird results from testing...
    Solved: I have script with same name in e:\python and e:\data\python. I kept updating the latter, while running the former. My mistake PyS60 1.9.5 sees both dirs, while 1.4.5 only its own dir. Not sure what to think about this, defect or a feature: most likely (an annoying) feature.

    Sleepy,

    --jouni

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by JOM View Post
    ...but there's something more weird. I would guess 5.0 has changed MBM file format and PyS60 didn't update the internal routines. Several built-in MBM icons still look corrupt, but it's the same with 1.4.5 and 1.9.5. Will search a bit..
    Found out that avkon2.mbm is 11 kk and avkon2.mif 642 kb, which explains the icons looking corrupted. Guess MIF is supported, regardless of what's documented. D*mn outdated docs Same code seems to work for both MBM and MIF, looking for a way to calculate how many items there are inside MIF...

    --jouni

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by marcelobarrosalmeida View Post
    <snip>
    wp_icon = Icon(mif,16398,16398)
    <snip>
    Hey! PyS60 supports relative icon and mask values from a mif/mbg file. You don't need to specify the exact values generated in the header(.mbg file). The starting value in the enum is 16384. So you should specify 14.

    Just curious : Is everyone using exact values for bitmap and its mask and not relative values? Since the documentation example specified (28,29), (40,41) bitmap,mask pairs for avkon2.mif.
    import antigravity

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by ashwinurao View Post
    Hey! PyS60 supports relative icon and mask values from a mif/mbg file. You don't need to specify the exact values generated in the header(.mbg file). The starting value in the enum is 16384. So you should specify 14.

    Just curious : Is everyone using exact values for bitmap and its mask and not relative values? Since the documentation example specified (28,29), (40,41) bitmap,mask pairs for avkon2.mif.
    Hmph,

    Personal experiences while coding "View MBM":
    http://jouni.miettunen.googlepages.com/viewmbm

    The whole area of using MBM/MIF is so poorly documented and sample coded that my guess would be: nobody uses them.

    Which really is a shame, since using internal graphics would give consistent look and feel to apps, offer some high quality graphics to developers for free, make handling (some) resources much easier and SIS files smaller.

    One of the problems of course is that MBM/MIF support is so poorly documented in general, not just in PyS60... There's no reference tables about graphics, file content changes without notice etc.

    Cheers,

    --jouni still upset that avkon2.mbm seems to be replaced by avkon2.mif and not able to find docs about MIF file format to figure out how many items there are in those files

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by JOM View Post
    --jouni still upset that avkon2.mbm seems to be replaced by avkon2.mif and not able to find docs about MIF file format to figure out how many items there are in those files
    I checked out your script(view_mbm.py) and I can see the icons when using avkon2.mbm. ((u"Avkon2 (233)", lambda:showicon(u"Avkon2 (233)", u"z:\\resource\\apps\\avkon2.mbm", range(233))),)
    import antigravity

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by ashwinurao View Post
    Hey! PyS60 supports relative icon and mask values from a mif/mbg file. You don't need to specify the exact values generated in the header(.mbg file). The starting value in the enum is 16384. So you should specify 14.

    Just curious : Is everyone using exact values for bitmap and its mask and not relative values? Since the documentation example specified (28,29), (40,41) bitmap,mask pairs for avkon2.mif.
    I was using absolute values in previous PyS60 versions, ashwinurao (no error at all).
    But I will try with offsets as well.

    By the way, when I created my MIF icons, I used the following info:

    http://discussion.forum.nokia.com/fo...ad.php?t=98661
    http://wiki.forum.nokia.com/index.ph...on_3rd_edition
    http://wiki.forum.nokia.com/index.ph...wBox_attribute

    I was not easy to understand all "pitfalls" but scalable icons are working fine now. And I think we may have a documentation problem here. In the document "S60 Platform: Porting from 2nd to 3rd Edition v1.1" there is the following statement:

    S60 3rd Edition provides a new API for the purpose of loading icons. This new API
    supports loading of both old bitmap icons (from MBM) and scalable icons (from MIF
    files). The MIF files are located in the same folders as the MBM files.
    But, as JOM cited, we have a different statement in Pys60 documentation:

    Note that MBM and MIF (MIF only in S60 2nd Edition FP3) are the only file formats supported.
    After this discussion, I am thinking about to write a detailed tutorial about MIF creation.

    Marcelo
    Last edited by marcelobarrosalmeida; 2009-05-26 at 14:01.

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by ashwinurao View Post
    I checked out your script(view_mbm.py) and I can see the icons when using avkon2.mbm. ((u"Avkon2 (233)", lambda:showicon(u"Avkon2 (233)", u"z:\\resource\\apps\\avkon2.mbm", range(233))),)
    Never said it's not working!

    The problem is that S60 5.0 avkon2.mbm is missing a lot of icons found in S60 3.1 version of avkon2.mbm and those that are there are located at different index numbers. Guessing maybe avkon2.mif might be better option, but so far haven't figured out how to count number of items inside MIF file.

    As result it will be tough to use avkon2.mbm graphics for anything. Unreliable. Might hardcode for each S60 version, but that would be really ugly and non-future-proof way. The solution might be to use similar "access method" as Symbian C++ is using i.e. not absolute index numbers, but relative via some header file. How to do that with python, no idea... Maybe I should write a feature request

    Will release updated "View MBM" this evening, maybe... Got pretty far last night, but really really want to crack MIF problem. Won't waste too much time with that, though.

    Truly happy with Listbox,

    --jouni

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

    Re: PyS60 [1.9.5] Tests and Feedback

    Quote Originally Posted by ashwinurao View Post
    Hey! PyS60 supports relative icon and mask values from a mif/mbg file. You don't need to specify the exact values generated in the header(.mbg file). The starting value in the enum is 16384. So you should specify 14.
    Tested: Icon()/Listbox working with relative indexes and generating a KErrNotFound with absolute indexes.

    Marcelo

  15. #15
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: PyS60 [1.9.5] Tests and Feedback

    Hello ,

    Please make this thread sticky

    Best regards
    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

Similar Threads

  1. PyS60[1.9.4] Tests and Feedback
    By tvijayan in forum Symbian
    Replies: 69
    Last Post: 2009-05-22, 00:53
  2. [PyS60 1.9.3] Tests and Feedback
    By croozeus in forum Symbian
    Replies: 24
    Last Post: 2009-04-17, 20:57
  3. [PyS60 1.9.0] Tests and Feedback
    By cyke64 in forum Symbian
    Replies: 107
    Last Post: 2009-02-18, 20:10
  4. Feedback on new document "Avoiding Common Failures in Symbian Signed tests"
    By mgroeber9110 in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 4
    Last Post: 2007-03-29, 07:31

Posting Permissions

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