Date: Mon, 22 Sep 2003 09:36:49 +0100 Cc: lablgtk at kaba.or.jp Subject: Re: Misc questions Message-ID: <20030922083649.GB26584 at redhat.com> References: <20030921111027.A12292 at pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030921111027.A12292 at pauillac.inria.fr> From: Richard Jones On Sun, Sep 21, 2003 at 11:10:27AM +0200, Francois Pottier wrote: > 4. In class [GTree.selection], shouldn't the methods [select_all] > and [unselect_all] have type unit -> unit instead of unit, since > they have a side effect? This would be consistent with the general > convention adopted in LablGTK. Jacques seems to have used unit -> unit methods in cases where you would want to call the method from a callback. So you can do: ok#connect#clicked ~callback:dialog#destroy instead of: ok#connect#clicked ~callback:(fun () -> dialog#destroy) (assuming in the latter case that #destroy was NOT defined unit -> unit). However it looks to me like #{,un}select_all would be called from callbacks, so this could be a mistake. Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you. "My karma ran over your dogma"