Forum: Ruby-Gnome 2 How to set text of SourceBuffer or TextBuffer

Posted by Marc Heiler (shevegen)
on 2011-09-08 01:00
Hi,

I have code snippet like this:

  source_buffer = Gtk::SourceBuffer.new
  source_buffer.text = "Yada yada\nya"

This used to work but no longer works.

Does someone know how to set the text content of a SourceBuffer widget
or a TextBuffer widget?
Posted by Marc Heiler (shevegen)
on 2011-09-08 01:02
Ah, it works when I do:

  require 'gtksourceview2'

Hmm... wondering whether TextBuffer does not allow that by default 
though.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.