Re: Add a method to a gtk class?
- From: Wolfnoliir <wolfnoliir@xxxxxxxxx>
- Date: Thu, 29 Apr 2010 23:33:53 +0200
On 29/04/2010 17:22, Michael Torrie wrote:
On 04/29/2010 10:03 AM, Wolfnoliir wrote:OK, I suppose I will just have to use an ordinary function then.
On 29/04/2010 17:03, Joe Riopel wrote:
On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir <wolfnoliir@xxxxxxxxx> 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 TextBuffer class create
your own TexBuffer subclass with the save_to_file method?
I suppose I could but the point of adding a method is to make things
simpler (than having a separate function) so I don't really want to do that.
Given that Gtk+ classes in python are often thin wrappers around opaque,
binary Gobject-based objects, perhaps the gtk.TextBuffer cannot be
monkey-patched in this way.
- Prev by Date: Re: modifying open office spreadsheet (with OO installed)
- Next by Date: Re: CGI python 3 write RAW BINARY
- Previous by thread: Re: Add a method to a gtk class?
- Next by thread: print executed query