Add a method to a gtk class?

2010-04-29 Thread Wolfnoliir
Hi, I would like to add a method to the gtk.TextBuffer class to save a text buffer to a file, but I get an error: line 22, in gtk.TextBuffer.save_to_file = gtk_TextBuffer_save_to_file TypeError: can't set attributes of built-in/extension type 'gtk.TextBuffer' Here is the code: 10 import gtk

Re: Add a method to a gtk class?

2010-04-29 Thread Wolfnoliir
On 29/04/2010 17:03, Joe Riopel wrote: > On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote: >> I would like to add a method to the gtk.TextBuffer class to save a text >> buffer to a file, but I get an error: > > I don't know gtk, but can you inherit from the TextBuff

Re: Add a method to a gtk class?

2010-04-29 Thread Wolfnoliir
On 29/04/2010 17:22, Michael Torrie wrote: > On 04/29/2010 10:03 AM, Wolfnoliir wrote: >> On 29/04/2010 17:03, Joe Riopel wrote: >>> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote: >>>> I would like to add a method to the gtk.TextBuffer class to save a text >&