MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16484.59682.567038.761564 at soggy.deldotd.com> Date: Fri, 26 Mar 2004 18:38:26 -0800 To: Olivier Andrieu Cc: lablgtk at kaba.or.jp Subject: Re: event variant types In-Reply-To: <16483.63571.455639.187324 at akasha.ijm.jussieu.fr> References: <16482.33127.497203.821118 at soggy.deldotd.com> <20040325165247V.garrigue@kurims.kyoto-u.ac.jp> <16483.50834.898498.682875@soggy.deldotd.com> <16483.63571.455639.187324@akasha.ijm.jussieu.fr> From: briand at aracnet.com >>>>> "Olivier" == Olivier Andrieu writes: Olivier> This `types' polymorphic variant only exists for Button events Olivier> apparently. Maybe it should be defined for all events kinds, for Olivier> consistency. Olivier> match GdkEvent.get_type event with Olivier> #GdkEvent.Button.types -> true Olivier> | `KEY_PRESS|`KEY_RELEASE -> true Olivier> | `MOTION_NOTIFY -> true Olivier> | _ -> false Almost ! Now I get : This expression has type ([> `BUTTON_PRESS | `BUTTON_RELEASE | `KEY_PRESS | `KEY_RELEASE | `MOTION_NOTIFY | `THREE_BUTTON_PRESS | `TWO_BUTTON_PRESS ] as 'a) Gdk.event but is here used with type GdkEvent.Button.t = GdkEvent.Button.types Gdk.event Type 'a is not compatible with type GdkEvent.Button.types = [ `BUTTON_PRESS | `BUTTON_RELEASE | `THREE_BUTTON_PRESS | `TWO_BUTTON_PRESS ] Brian