Date: Sun, 21 Sep 2003 11:10:27 +0200 From: Francois Pottier To: lablgtk at kaba.or.jp Subject: Misc questions Message-ID: <20030921111027.A12292 at pauillac.inria.fr> Reply-To: Francois.Pottier at inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I've been dabbling with LablGTK2 (CVS snapshot of 20030828). Here are miscellaneous issues I've encountered: 1. I'm working with a [list_store] object (as found in module [GTree]). I have noticed that values of type [tree_path] and [tree_iter] are pretty useless, since they become obsolete when rows are added or deleted. It seems that the right thing to do is to use row references, as found in module [GtkTree.RowReference]. However, I don't understand how to create such references in a type-safe manner. The only way I have found is to write GtkTree.RowReference.create (Obj.magic model#as_model) where [model] is my [list_store] object. This works, but is awful. What is the correct approach? I must say I am somewhat lost with the way LablGTK assigns types to GTK objects. It would be nice if the README file said more about the typing aspects of LablGTK. 2. Is there a way of sending [maximize] and [fullscreen] messages to a window? These methods seem to be declared in a .props file, so I tried calling GtkBaseProps.Window.maximize window#obj but that doesn't work: the module [GtkBaseProps] is apparently invisible to library clients. 3. Why the dissymmetry between window#show and window#misc#hide? Same question for some other methods. More generally, what is the rationale for putting certain methods inside sub-objects (misc, connect, etc.) and others within the main object? 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. Thanks for your help, -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/