Yared Hufkens | 9 Feb 15:38
Picon
Favicon

PHP-GTK: GladeXML::get_widget() doesn't find some widgets

I have a Glade file with this widget:

        <child>
          <widget class="GtkTextView" id="errLog">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="editable">False</property>
            <property name="cursor_visible">False</property>
            <property name="accepts_tab">False</property>
          </widget>
          <packing>
            <property name="expand">True</property>
            <property name="fill">True</property>
            <property name="position">2</property>
          </packing>
        </child>

which is a child of a GtkVBox (errContainer), which is a child of a
GtkWindow (errWindow), and I want to write something into it:

function openErr($message) {
	logError($message);

	$window = glade()->get_widget('errWindow');
	$log = glade()->get_widget('errLog');

	$buf = new GtkTextBuffer();
	$buf->set_text(file_get_contents(LOG_FILE) or "Cannot read file ".LOG_FILE."!");

	$log->set_buffer($buf);
(Continue reading)


Gmane