🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #17712

Re: PopUp menus

#17712
From: Larry Rosenstein
Date: Wed, 29 Jul 1987 01:39
32 lines
1663 bytes
In article <1340@apple.UUCP> I wrote:
>
>First the interface to the trap looks like this:
>
>	FUNCTION PopupMenuSelect(theMenu: MenuHandle;
>				 left, top, item: INTEGER): LONGINT;

I was wrong about the interface to the trap.  I got the left and top
parameters switched.  The top parameter comes first.  The correct
parameters are in the MPW interface files.

The reason why I was confused is that I was writing a custom menu defproc.
In order to support popup menus, custom defprocs have to respond to a new
message in order to tell the Menu Manager where to place the popup.

It turns out that the hitPt, which is passed to the defproc, is interpreted
differently for this message; the h & v coordinates are switched.
Naturally, this made the menu appear in the wrong place, but switching the
parameters to PopupMenuSelect made it appear in the correct place.




-- 
Larry Rosenstein

Object Specialist
Apple Computer

AppleLink: Rosenstein1
UUCP:  {sun, voder, nsc, mtxinu, dual}!apple!lsr
CSNET: lsr@Apple.com
Technical Details
Message-ID: <1384@apple.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!columbia!rutgers!sri-spam!mordor!lll-lcc!pyramid!voder!apple!lsr
References: <2695@crcge1.UUCP> <1340@apple.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!columbia!rutgers!sri-spam!mordor!lll-lcc!pyramid!voder!apple!lsr
From: lsr@apple.UUCP (Larry Rosenstein)
Newsgroups: comp.sys.mac
Subject: Re: PopUp menus
Message-ID: <1384@apple.UUCP>
Date: Tue, 28-Jul-87 21:39:07 EDT
Article-I.D.: apple.1384
Posted: Tue Jul 28 21:39:07 1987
Date-Received: Fri, 31-Jul-87 01:30:04 EDT
References: <2695@crcge1.UUCP> <1340@apple.UUCP>
Reply-To: lsr@apple.UUCP (Larry Rosenstein)
Organization: Advanced Technology Group, Apple Computer
Lines: 32
Keywords: System4.1 Menus PopUp