Archived:Basic PySymbian application - series1
kiran10182
(Talk | contribs) m (Internal referencing and little bit formatting) |
|||
| Line 39: | Line 39: | ||
<code python> | <code python> | ||
| − | + | appuifw.query(u"GO","query") | |
| − | + | appuifw.note(u"stop","info") | |
</code> | </code> | ||
| Line 65: | Line 65: | ||
==Helpful Links== | ==Helpful Links== | ||
| − | [ | + | * [[How to use tabs]] |
| − | [ | + | * [[How to draw on canvas]] |
| − | [ | + | * [[How to use Forms]] |
Revision as of 13:41, 19 July 2008
Contents |
Introduction
Mobile applications we know are very interesting and attractive. And at the same time mobile application development is the again the most interesting thing. This series of article will help a beginner to develop a good mobile application using the Python for Series60 Platform. The first series will make us understand the structure of a application. A good mobile application developer before designing its application or in clear words before a developer starts coding with the application he must be clear about the application structure of the application which he wants to design. As we are in the PyS60 section this article will focus on the application structure for PyS60 app.
Application Structure
The figure below below will tell us about the application structure of a PyS60 application. A good developer at the time of designing a application should always keep this application structure in mind and should try to port his application according to the figure below.
Explanation
The figure above tells most part of the story then also we will make lesson out of it.
- At the top of the figure you can see that title is written. Thats the portion of our application one should set the title of the application. In PyS6o we can set the title by using.
appuifw.app.title = u"My First App"
- The next to the title is the navigation tabs we can set tabs UI if we want that kind in our application to know how to set a tabs interface look here.
Body
Below navigation tabs comes the body of the application which is indeed the most important part of the application. In PyS60 we can assign the body of our application to basically four types they are;
- A canvas that handles graphics on screen.
- A form that is used to built a complex forms that include combination of various fields such as text numbers and lists.
- A text object that handles a free form text input.
- A listbox that shows a list of items with
Dialog
Inside the body of the application we can see a dialog window. In a dialog window we can handle the input and output things of our application. In PyS60 we have queries, notes and much more to do this. Below is a code example.
appuifw.query(u"GO","query")
appuifw.note(u"stop","info")
Menu & Exit
After every thing there leaves the two important aspects in our application they are
Access To The Left Soft Key
Access To The Right Soft Key
We can use the the left key in our application to access the options or the menus of our application. In PyS60 we can do as following:
appuifw.app.menu=[(u"menu1",callback_1),
(u"menu2",callback_2)]
The right soft key in our Python application is used to exit our application. In PyS60 we can do it as:
appuifw.exit_key_handler = function
where function is a callback function that is called when the left key is pressed.


