Content-Type: text/plain; charset="iso-8859-1" From: Stalkern 2 Reply-To: stalkern2 at tin.it To: Olivier Andrieu Subject: Re: trouble in creating a drawing area on (still) not shown window; GPointer.Null exception Date: Thu, 27 Mar 2003 11:51:18 +0100 Cc: lablgtk at kaba.or.jp References: <200303251756.31234.stalkern2 at tin.it> <16001.43322.17670.133062 at akasha.ijm.jussieu.fr> In-Reply-To: <16001.43322.17670.133062 at akasha.ijm.jussieu.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200303271151.18859.stalkern2 at tin.it> Il Wednesday 26 March 2003 14:20, Olivier Andrieu ha scritto: > Stalkern 2 [Tuesday 25 March 2003] : > > Hello to everybody > > > > I have a basic question: what's the clean approach for setting callbacks > > in window1 to a drawing area in window2 if window2 IS NOT SHOWN YET? > > I think you want to 'realize' the window. That is, GTK asks the X > server to create the window, but does not map (show) it yet. > > area#misc#realize () > > This should avoid the GPointer.Null exception. Thanks, I've tried that but I still am uncomfortable. When I have two drawing areas on the same window1, both of them are sensitive to the expose event, while if I put a button on window1, allowing to launch a window2 with drawingarea2, when I launch window2 and drawingarea2, the drawingarea1 in window1 stops reacting to the expose event. AFAIK so far, this is because of the Gmain.main loop, that is unique for every lablgtk program (right?). But not for every window, I suppose! So my question would be, in other words: Callbacks for launching modal windows end with calls to GMain.main. Shall I use the same for NON modal windows or is that the wrong point with my independent windows? T I A Ernesto