From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 8 Jun 93 01:13:00 GMT From: enterpoop.mit.edu!eru.mt.luth.se!kth.se!sunic!mcsun!uknet!pipex!bnr.co.uk !bnrgate!nott!torn!spool.mu.edu!howland.reston.ans.net!darwin.sura.net!news-fee d-1.peachnet.edu!umn.edu!vz.cis Subject: Ada 9X Windows Question Message-ID: <7JUN199320130551@vz.cis.umn.edu> List-Id: A general question on standards and portability concerning object-oriented programming in Ada 9X for Microsoft Windows. I am trying to guess as to a standard mapping from the event-callback mechanism of MS-Windows to the tagged type semantics of Ada 9X. Looking at the big picture, it is obvious that the C++ and Borland Pascal mappings are a kluge, and follow no apparent standards (particularly Borland - no surprise). To demonstrate the variety, here is a Windows button example in 3 different OOLs. -------------------------------- Borland Pascal 7.0 ObjectWindows type TStepWindow = object(TWindow) ... procedure WMLButtonDown(var Msg: TMessage); virtual wm_First + wm_LButtonDown; { strange semantics } end; ----------------------------------- Borland C++ 3.0 ObjectWindows class TMyWindow : public TWindow { public: ... virtual void WMLButtonDown(RTMessage Msg) = [ WM_FIRST + WM_LBUTTONDOWN ]; // even stranger }; ------------------------------ Microsoft C++ 7.0 Foundation Class class CMainWnd : public CFrameWnd { ... public: afx_msg void OnLButtonDown( UINT nFlags, CPoint point ); DECLARE_MESSAGE_MAP(); // a macro mapping }; BEGIN_MESSAGE_MAP( CMainWnd, CFrameWnd ) ON_WM_LBUTTONDOWN() END_MESSAGE_MAP() ---------------------------------------- Looking at the manuals for the compilers, it's hard to get an understanding of what parts of the syntax are part of the OOL and what is hacked on. In comparison, by using case statements at least you knew the code was portable. My question is: Will the best Ada 9X approach be to use pragmas and access procedures as described in Support for Programming Paradigms (Section 3.2) of the Ada 9X Mapping Rationale; or go with a universal GUI interface (as yet undefined), code generator, and library that cuts across OS's and languages? And if the former, what would an example of the calling convention look like, and how would tagged types fit in the scheme? I think this is an important issue because of the large fraction of code involved in a typical application's GUI. Setting up a standard early will be just as important for the Windows programmer as the language user. J. Pukite pukite@vz.cis.umn.edu