Python Framework for Symbian Series 60 phones

Thursday 30 November 2006

Journal

Today I made some good progress. I coded the core of the application and loading, initialization and service discovery part. Clearly, the phone get and XML file from the server giving its URL, parse it and display the list with the homemade SingleLineList.

I'll work tonight on getting the the item id when pressing a button.

I gotta think of how to implement a global callback class to all listbox object. That could simplify the navigation in the application

Tuesday 28 November 2006

Journal

Today, almost all the UI elements are coded for now, I just need to mix pictures and text for the last one. We have the following elements:

  • A copy of the single line listbox object because of style matter(#TODO: fix transparency for icons)

  • a longtext listbox object were you can define the length in pixel and the number of lines to display (with scroll bar)

  • A normal text object (with scroll bar)

Thursday 16 November 2006

Journal

So here come some fresh news. As I mentioned in the last post the ListBox objects are not powerful and flexible enough for the project requirements. Recoding a ListBox in C++ would consume hell of time and even with the existing other list box type I couldn't satisfy the requirements.

So the last days, I made a new class in the UI package of the MobiiliPuntariAPI which is a copy of the ListBox but in Python! Performances will be poor but it works... It consist basically of drawing on a canvas.

All the logic for scrolling elements and drawing the caption took the most of the time. It's not easy nether pretty to find all cases. But it's a good base class that I will use for the other lists with extended text and extended text + picture. I might also add a little scroll bar on the right.

TODO:

  • try to find a way to have icons with transparency (tomorrow maybe :D)
  • clean the code and protect some variables and method from violation

Friday 10 November 2006

Journal

I when through services on the server With Vadym.

I now can get the first menu with the services on the emulator, so it will work on the phone. The text is displayed in UTF-8 without problems, I get special characters also.

Now the difficulties: one the news menu, we are supposed to display a description or title for the article. I can display the full text with Listbox menu which was my original idea. I can only display something like 20 characters or even less.

Conclusion, I go back to C++ and check if there is no an implementation that I could port to PyS60

Meeting report (2006-11-08):

This meeting was just a summary of the work done the last 4 weeks before this meeting

The next meeting is fixed on 2006-12-08.

The new milestones are:

  • 2006-01-31: Language checking
  • 2006-02-7 to 9: Seminars
  • 2006-2-16: Theses for supervisors
  • 2006-2-21: Evaluation meeting

Monday 6 November 2006

Journal

I spent the past week messing with encoding: the idea was to create a multi-language interface. I wanted to use .lang files often used in PHP because of it's simplicity. It's format is:

;keyword
clé
(empty line)
;next
suivant
(empty line)

The problem is that I cannot for some reasons display characters out of the 128 range i.e also special characters we use in French, Finnish...

I couldn't make it, so I add to find a different solution. I'm using "dictionary" classes which is the equivalent of T classes in Symbian. Here a piece of source

import dict
 
class TLang(dict):
    def __init__(self):
        dict.__init__(self)
 
        # and now the dictionary value like:
        self['value']    = valeur
        self['Edit']     = u'Editer'
        self['Next']     = u'Suivant'
        self['Loading']  = u'Chargement'

Then we use it like

>>TAG = TLang()
>>print TAG['Loading']
Chargement

LEFEVRE Damien
http://www.lfdm.net
contact@lfdm.net