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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!r40g2000prh.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Properties Date: Wed, 1 Dec 2010 11:36:57 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> <4pnv7nl4cdui$.1n28i7lqk4mek$.dlg@40tude.net> <1k7367gtebsgm$.18auo6u3nfg34.dlg@40tude.net> <1u5dftkqqi68c.10079qnqyyfwb$.dlg@40tude.net> NNTP-Posting-Host: 174.28.198.93 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1291232218 27333 127.0.0.1 (1 Dec 2010 19:36:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 1 Dec 2010 19:36:58 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r40g2000prh.googlegroups.com; posting-host=174.28.198.93; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16699 Date: 2010-12-01T11:36:57-08:00 List-Id: >> Agreed, but I don't believe we're stuck with that solution. >> All you need is procedure'Access for the callback. > >No, because events have parameters and those must be typed. >The standard solution is that you instantiate a generic (and >there is one for each number of parameters and the results). >That is extremely boring. Er, why not use OO/tagged-records for the events themselves and let the base-handler have that as a parameter? i.e. the handler would be an access to something like this: Procedure On_Event( Object : in out : GUI_Object; --'Class? Event : In Base_Event'Class ); The Root for GUI-objects can say "On_Event(...) is null*" and allow overriding for the components that DO use it. *A Null-body, not null- access. Further some mouse-event can extend the base-record with items such as the position of the mouse. Or is there something I'm missing?