Date: Fri, 4 Mar 2005 10:39:48 +0000 Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: How to use file_chooser_dialog Message-ID: <20050304103948.GC22105 at furbychan.cocan.org> References: <20050304000458.GA28358 at furbychan.cocan.org> <20050304.102539.78723449.andrieu at ijm.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050304.102539.78723449.andrieu at ijm.jussieu.fr> From: Richard Jones Thanks, that works. For future reference, I now have the following code which works correctly. let callback () = let dialog = GWindow.file_chooser_dialog ~action:`OPEN () in dialog#add_button_stock `CANCEL `CANCEL; dialog#add_select_button_stock `OPEN `ACCEPT; if dialog#run () = `ACCEPT then ( let filename = dialog#filename in Option.may (fun filename -> prerr_endline ("filename = " ^ filename)) filename; ); dialog#destroy () in open_item#connect#activate ~callback; Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com