in reply to Gtk2 text widget

You really should post fully working examples, because it is dubious how you are using the $vbox. You may need to set your $buffer as a global, or pass it as an arg to a sub.

I'm not really a human, but I play one on earth. Cogito ergo sum a bum