MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16050.45221.276201.439544 at karryall.dnsalias.org> Date: Fri, 2 May 2003 19:53:41 +0200 From: Olivier Andrieu To: Richard Jones Cc: lablgtk at kaba.or.jp Subject: Re: GtkHtml bindings for OCaml - some help required In-Reply-To: <20030502160648.GA25448 at redhat.com> References: <20030502130442.GA24136 at redhat.com> <16050.29386.415127.952122@akasha.ijm.jussieu.fr> <20030502134153.GB24136@redhat.com> <16050.30735.677940.706942@akasha.ijm.jussieu.fr> <20030502160648.GA25448@redhat.com> Richard Jones [Friday 2 May 2003] : > > On Fri, May 02, 2003 at 03:52:15PM +0200, Olivier Andrieu wrote: > > but why don't you call gconf_init then ? > > Actually, the real reason would be 'because I don't know how to'. Well simply define in the C file a ml_gtk_html_init function that calls gconf_init(), and declare it in gHtml.ml : external gtk_html_init : unit -> unit = "ml_gtk_html_init" let _ = gtk_html_init () > static void > gtk_layout_size_allocate (GtkWidget *widget, > GtkAllocation *allocation) > > ... > > layout->hadjustment->page_size = allocation->width; > > > The layout pointer is correct. layout->hadjustment is NULL, hence the > line fails. Somehow I need to initialize the {h,v}adjustment fields to > something non-NULL when creating the widget, but I don't know how to > do that. But when does it segfaults ? Is it during the gtk_html_new or later when you try to use the widget ? You could try to realize the widget before using it (widget#misc#realize), that could trigger the creation of the adjustements. -- Olivier