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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!bloom-beacon!Leo!newman From: newman@Leo.UUCP Newsgroups: comp.windows.x,comp.lang.ada Subject: Re: X and Ada? Message-ID: <1415@bloom-beacon.MIT.EDU> Date: Sat, 12-Sep-87 18:13:17 EDT Article-I.D.: bloom-be.1415 Posted: Sat Sep 12 18:13:17 1987 Date-Received: Sun, 13-Sep-87 08:51:17 EDT References: <249@sandia.UUCP> <64@kvasir.esosun.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: newman@Leo.UUCP (Ron Newman) Organization: Massachusetts Institute of Technology, Project Athena Keywords: Toolkit, Ada, Callback Xref: utgpu comp.windows.x:938 comp.lang.ada:662 List-Id: In article <64@kvasir.esosun.UUCP> hyland@kvasir.UUCP (Steve Hyland) writes: >In article <249@sandia.UUCP> pjatter@sandia.UUCP (Paul Attermeier) writes: > >>>From what little I've seen of the X toolkits, it appears that >>X makes 'callbacks' to the application program. If X is in C >>(which would be acceptable in our 'Ada' system) and the application >>is in Ada, it looks like we still have the same problem. > >Yes, the current X toolkit allows the user to include a call-back >routine in the argument list. Since this would violate the spirit of >Ada, we will not allow this. We have a similar problem in the intrinsics, >with the use of event handlers in widgets. The answer ? Its not completely >obvious to me at this point. > Is there some obvious reason that you can't pass an Ada function as a parameter to the toolkit's C functions? How does this violate the "spirit of Ada"? *Any* toolkit is going to depend on the use of call-back functions. If the toolkit is going to dispatch each event to the appropriate widget, it needs to have a mapping of {Window ID, Function-To-Call}. This mapping be a linked list, an array, a hash table, or whatever, but whatever it is, it can only get filled by having someone pass a callback function as an argument. If Ada can't handle that, maybe Ada needs to be extended. /Ron Newman