MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16483.50834.898498.682875 at soggy.deldotd.com> Date: Thu, 25 Mar 2004 21:58:42 -0800 To: lablgtk at kaba.or.jp Subject: Re: event variant types In-Reply-To: <20040325165247V.garrigue at kurims.kyoto-u.ac.jp> References: <16482.33127.497203.821118 at soggy.deldotd.com> <20040325165247V.garrigue@kurims.kyoto-u.ac.jp> From: briand at aracnet.com >>>>> "Jacques" == Jacques Garrigue writes: Jacques> But I have a strange feeling that is not what you are Jacques> actually trying to do. The point is, all events are already Jacques> part of the GdkEvent.any type. So you don't have to wrap Jacques> anything. If you want to distinguish some specific events, Jacques> you can do it with Jacques> GdkEvent.get_type: Jacques> match GdkEvent.get_type event with Jacques> #GdkEvent.Button.types -> true Jacques> | #GdkEvent.Key.types -> true Jacques> | #GdkEvent.Motion.types -> true Jacques> | _ -> false Jacques> for instance. This is of course exactly what I am trying to do. File "main.ml", line 297, characters 8-27: Unbound type constructor GdkEvent.Key.types ?? I've tried various things but none seem to work. Unfortunately I'm just guessing because I am new to ocaml/ml and I don't grok the module/struct/type system quite yet. Thank You Brian