View Single Post
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#9
Originally Posted by armen_shlang View Post
program = hildon.Program.get_instance()
that no such function exists.

I tried other examples, I seem to be getting errors saying no such function exist in the hildon library.
If you're using the tutorial linked above, it's for fremantle and has slightly newer version of hildon...

Here's some bastardized bits of my old diablo code (which is Glade so all the interesting UI stuff is in the XML file, it's faster to use "hardcoded" widgets and for small programs also simpler, but I wanted to learn Glade...

Code:
import hildon, osso, gtk
osso_c = osso.Context("myprog", "0.0.1", False)
app = hildon.Program()
window = hildon.Window()
#window.connect('destroy', mycleanuproutine)
app.add_window(window)

# add your Hildon/GTK widgets to the window

window.show_all()
For older examples see for example (the first one especially)

https://wiki.maemo.org/PyMaemo/Using_Python_in_Maemo
http://wiki.maemo.org/PyMaemo/Python-osso_examples
 

The Following User Says Thank You to rambo For This Useful Post: