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.3 required=5.0 tests=BAYES_00,INVALID_DATE, SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!decwrl!ucbvax!NUSVM.BITNET!GBODSO1 From: GBODSO1@NUSVM.BITNET (HC Eng) Newsgroups: comp.lang.ada Subject: MOTIF BINDING Message-ID: <9009060654.AA09349@ajpo.sei.cmu.edu> Date: 10 Sep 90 15:32:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet X-Unparsable-Date: Thu, 06 Sep 90 14:42:15 SST List-Id: Please refer to the item in Vol 90 Issue 168 about JPL coming up with a Motif binding. (Please note that I am very new to Ada.) In the OSF Motif toolkit, widgets are treated as objects and callbacks are passed as subprogram pointers. I am dying to know how this could be implemented in Ada since Ada does not have a subprogram type. Presently I am coding my own "Motif" toolkit in Ada for the IBM RS/6000 and the stumbling block is the lack of the subprogram type (see Ada LI65). I am solving the problem very unsatisfactorily by making the interface layer call a procedure CALLBACK(W) where W is the widget being activated. Inside CALLBACK is a giant IF and ELSIF block to cater for every widget declared in my program. It is unsatisfactory because everytime I add a new widget, I must amend this block. Therefore, if there is something that I don't know that would make the Motif binding possible, I would be very happy to hear it immediately.