Date: Sat, 22 Apr 2006 23:00:12 +1000 From: Erik de Castro Lopo To: lablgtk at math.nagoya-u.ac.jp Subject: Re: Setting the cursor in a text_view object Message-Id: <20060422230012.5d1fa4ac.ocaml-erikd at mega-nerd.com> In-Reply-To: <20060422.211955.71882695.garrigue at math.nagoya-u.ac.jp> References: <20060421134912.5de86566.ocaml-erikd at mega-nerd.com> <20060422190527.094d0aa6.erikd@mega-nerd.com> <20060422191222.64fba4d7.ocaml-erikd@mega-nerd.com> <20060422.211955.71882695.garrigue@math.nagoya-u.ac.jp> Organization: Erik Conspiracy Secret Labs Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Content-Length: 671 Jacques Garrigue wrote: > Classical encoding of potentially null pointer. Ahh, of course. > So you just have to do > > let tw = > match tview#get_window `TEXT with Some w -> w |None -> assert false > in > Gdk.Window.set_cursor tw (Gdk.Cursor.create `LEFT_PTR) Thank you , thank you, thank you! That works! Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan