Hi Christian, Thanks for the added info. I guess it means that I have to update myself...
cheers On Thu, 18 Dec 2003 14:21:35 -0200 Christian Robottom Reis <[EMAIL PROTECTED]> wrote: > On Thu, Dec 18, 2003 at 10:05:20AM -0600, John Hunter wrote: > > >>>>> "Luc" == Luc Lefebvre <[EMAIL PROTECTED]> writes: > > > > Luc> Hi, I am experimenting with glade/gtk and python. (python > > Luc> 2.2, glade2, gtk-1.2). I tried an example with a window and > > Luc> a simple DrawingArea. I can get the window up and bind the > > Luc> mainquit method to the event but when I try any of the draw > > Luc> functionis (for ex. draw_point) it doesn't work. I get the > > Luc> message: > > > > It's not a glade problem. The traceback is correct, gtk.DrawingArea > > doesn't have the draw_point method. gtk.gdk.Drawable does > > > > When the application is realized, you'll be passed at gtk.DrawingArea > > widget. The window attribute of that widget is a gtk.gdk.Drawable. > > Here is a simple example that illustrates how to draw. > > > > Just as an explanation to what confused Luc: the "old", 0.6, > gtk.GtkDrawingArea *had* API which proxied all calls to the underlying > GdkWindow. So it used to be okay to do > > drawingarea.draw_point() > > -- the GtkDrawingArea.draw_point() method proxied over to the > GdkWindow's draw_point() method. > > This convenience doesn't exist in PyGTK-2 (it was mainly a subproduct > borne out of the fact that we had Python wrapper classes), so you need > to use > > drawingarea.window.draw_point(). > > now. I'll update the upgrade item in the FAQ to clear up the confusion. > > PS: Luc, you're not using GTK+ 1.2, even if you think you are <wink> > > Take care, > -- > Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 -- Luc Lefebvre In the beginner's mind there are many possibilities, in the expert's mind there are few. <Shunryu Suzuki> Key fingerprint = D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
