From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc656fd0afa65ff3 X-Google-Attributes: gid103376,public From: wpritche@osf1.gmu.edu (William W Pritchett) Subject: Re: Alright, now for an Ada '95 question. Date: 1996/08/15 Message-ID: <4uvvgd$7sb@portal.gmu.edu>#1/1 X-Deja-AN: 174418561 references: <32134421.31CF@wpllabs.com> content-type: text/plain; charset=US-ASCII organization: George Mason University, Fairfax, Virginia, USA mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-08-15T00:00:00+00:00 List-Id: Try something like the following code if target in Button'class then ... But if you're doing Event handling in AppletMagic there is an easier way to check for a particular widget if The_Event.Target = Object_Ptr(My_Widget) then ... where My_Widget is a Button_Ptr, MenuItem_Ptr, etc and The_Event is of type Event.Event_Ptr Hope this helps, Bill Pritchett DCS Corporation Tom Di Sessa (tdisessa@wpllabs.com) wrote: : First of all, I want to thank the people who responded to my first(and : rather unpolite) post. Thank you. : In Java, I am able to do this comparison: : (target is of Class(Type) Component, and Class Button is is derived from : Component) : if (target instanceof Button) {...} : Now, is there a way to do this comparison in Ada '95, if target was of : type Component'Class and Button was a derived type from Component? : -tom :) : -- : +------------------------------------------------------------------+ : | Thomas G. Di Sessa || | : | WPL Laboratories, Inc. || Email: tdisessa@wpllabs.com | : | Whitehall Offices, Suite 6 || Voice: 610.658.2362 ext. 227 | : | 410 Lancaster Avenue || Fax: 610.658.2361 | : | Haverford, PA 19041 || | : +------------------------------------------------------------------+