Date: Fri, 5 Dec 2003 13:05:33 +0000 Cc: lablgtk at kaba.or.jp Subject: Re: The type of this expression, _[> `DELETE_EVENT ] GWindow.dialog, Message-ID: <20031205130533.GA21247 at redhat.com> References: <20031205110336.GA20159 at redhat.com> <16336.30123.811395.403050 at akasha.ijm.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16336.30123.811395.403050 at akasha.ijm.jussieu.fr> From: Richard Jones OK, a question related to the previous one. I'm trying to do a "wizard" style dialog, like this: +--------------------------+ | vbox | | | |==========================| | Back Next | +--------------------------+ I reuse the same vbox for each "page" of the dialog, wiping its contents by calling this between pages: let clear_vbox () = List.iter vbox#remove vbox#children This works fine, visually anyway. However after about page 5 or 6, the program slows down to a crawl. Examination of the program shows that the loop above in clear_vbox is going round dozens of times. Yet there are or should be only one or two widgets in the vbox on each page. It looks as if previous widgets are somehow being "remembered" by the vbox, although why and how is not clear (they disappear from the screen correctly). What's going on here? How do I once and for all remove the children of a vbox? Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - improving website return on investment Learning Objective CAML for C, C++, Perl and Java programmers: http://www.merjis.com/richj/computers/ocaml/tutorial/