[mono-vb] Glade Autoconnect problem

Klaus Siebke ksiebke at web.de
Thu Dec 2 07:35:50 EST 2010


Hi,

that's easy and has nothing to do with the compiler: the .glade
definition file could not be found by your application.

So you have either to specify the full path to your .glade file in 

dim interfaz as new Glade.XML
("<path>/interfaz.glade","window1",Nothing)

Or to put the .glade file into the same directory as your compiled
program (.exe file).

/Klaus


-----Ursprüngliche Nachricht-----
Von: mono-vb-bounces at lists.ximian.com
[mailto:mono-vb-bounces at lists.ximian.com] Im Auftrag von nemesis545
Gesendet: Dienstag, 30. November 2010 14:08
An: mono-vb at lists.ximian.com
Betreff: [mono-vb] Glade Autoconnect problem



Autoconnect can't define a handler for singals of glade interface .
why?

glade :interfaz.glade
<?xml version="1.0"?>
<glade-interface>
  <!-- interface-requires gtk+ 2.16 -->
  <!-- interface-naming-policy project-wide -->
  <widget class="GtkWindow" id="window1">
    <property name="visible">True</property>
    <property name="destroy_with_parent">True</property>
    <signal name="destroy" handler="on_window1_destroy"/>
    <child>
      <widget class="GtkVBox" id="vbox1">
        <property name="visible">True</property>
        <property name="orientation">vertical</property>
        <child>
          <widget class="GtkLabel" id="label1">
            <property name="visible">True</property>
            <property name="label" translatable="yes">label</property>
          </widget>
          <packing>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <widget class="GtkButton" id="button1">
            <property name="label" translatable="yes">button</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </widget>
          <packing>
            <property name="position">1</property>
          </packing>
        </child>
      </widget>
    </child>
  </widget>
</glade-interface>
monobasic: Main.vb

Imports System
Imports Gtk
imports Glade

Public Class MainClass

       Public Shared Sub Main ()
		Application.Init ()
		dim interfaz as new Glade.XML
("./interfaz.glade","window1","")
		interfaz.Autoconnect(interfaz)
                Application.Run ()
	End Sub
        Sub on_window1_destroy ( ByVal obj as object, ByVal args as
DeleteEventArgs )
    	         Application.Quit()
	End Sub
End Class

-- 
View this message in context:
http://mono.1490590.n4.nabble.com/Glade-Autoconnect-problem-tp3065335p30
65335.html
Sent from the Mono - VB mailing list archive at Nabble.com.
_______________________________________________
Mono-vb mailing list
Mono-vb at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-vb



More information about the Mono-vb mailing list