[Vala] Fwd: Re: GTK and Property problems
- From: Andrew <rugby471 gmail com>
- To: vala-list gnome org
- Subject: [Vala] Fwd: Re: GTK and Property problems
- Date: Sat, 26 Jun 2010 09:30:56 +0100
On 26/06/10 09:13, pHilipp Zabel wrote:
On Sat, Jun 26, 2010 at 9:36 AM, Andrew <rugby471 gmail com> wrote:
HI guys,
Perhaps the simplest way to ask this is, could anyone tell me why when
the attached file (Genie) is compiled and then run, do I get these error
messages?
(wasiliana:2710): Gtk-CRITICAL **: gtk_container_add: assertion
`GTK_IS_CONTAINER (container)' failed
(wasiliana:2710): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(wasiliana:2710): GLib-GObject-CRITICAL **: g_signal_connect_object:
assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
You are accessing the MainWindow.scrolled_window property from
wMain.init, but you never assigned anything to it. In MainWindow.init
you are creating local variables for the widgets, you could try this
to assign them to the object properties:
--- a/main.gs 2010-06-26 10:00:46.000000000 +0200
+++ b/main.gs 2010-06-26 10:07:58.000000000 +0200
@@ -63,6 +63,10 @@
vbox.pack_start(scrolled_window, true, true)
this.add(vbox)
+ this.scrolled_window = scrolled_window
+ this.toolbar = toolbar
+ this.forward_button = forward_button
+ this.location_entry = location_entry
def on_mainwindow_delete_event() : bool
this.hide()
regards
Philipp
Thankyou very much :-)
One last question, is this the most efficient way to do it? It seems
like a lot of duplication.
--
Andrew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]