From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16481.46955.27649.776507 at karryall.dnsalias.org> Date: Wed, 24 Mar 2004 17:29:31 +0100 To: Christoph Bauer Cc: lablgtk at kaba.or.jp Subject: Re: Lablgtk under windows In-Reply-To: References: <000a01c41100$1959bc40$c64efea9 at Pc1> <20040324073520N.garrigue@kurims.kyoto-u.ac.jp> > BTW, I'm a bit disappointed about the complexity of the GTree > API. It is hard to create a simple list. It's not *that* hard. Anyway, that's not really LablGTK's fault, the GTK+ API is like this. In the latest snapshost there's a convenience function in GTree for creating "simple" list (ie a model with only one column). val store_of_list : 'a Gobject.data_conv -> 'a list -> list_store * 'a column let store_of_list conv data = let cols = new column_list in let column = cols#add conv in let store = list_store cols in List.iter (fun d -> let row = store#append () in store#set ~row ~column d) data ; store, column -- Olivier