Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!diku!daimi!jnp From: jnp@daimi.UUCP (J|rgen N|rgaard) Newsgroups: comp.lang.modula2,comp.sys.mac Subject: Small bug in MacMETH toolbox-interface Message-ID: <446@daimi.UUCP> Date: Fri, 14-Nov-86 03:52:03 EST Article-I.D.: daimi.446 Posted: Fri Nov 14 03:52:03 1986 Date-Received: Sun, 16-Nov-86 01:25:44 EST Reply-To: jnp@daimi.UUCP (J|rgen N|rgaard) Organization: DAIMI: Computer Science Department, Aarhus University, Denmark Lines: 28 Xref: mnetor comp.lang.modula2:5 comp.sys.mac:76 Small bug in MacMETH 2.0 Toolbox interface: Menumanager: GetIconItem the result parameter is a "VAR IconItem:Byte", due to modulas way of handling BYTEs this is wrong. Pascal and modula use exactly the opposite BYTEs of a WORD when accessing just one BYTE. One solution could be: (in interface module of course) VAR dirty : RECORD b1,b2:BYTE END; .......... GetIconItem(parameter1,parameter2, dirty.b1); assign dirty.b2 to the return parameter. If there is any interest I'll post a translation of a TML-pascal example of a menudefinition-procedure, entirely written in MODULA-2. It is the "trivial" case: the standard menu definition redefined. But then in can be extended to interesting cases like Macdraws "Pattern"-menu. This bug is likely to occur everywhere BYTEs are used as parameters. Not checked out. (Mail me if you see this C. Pfister; implememtor of the toolbox-interface).