🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5839

Accessing NewMenu UserData

#5839
From: Dale Larson
Date: Sun, 14 Oct 1990 20:40
15 lines
1051 bytes
I want to use the UserData field of the NewMenu struct to hold a pointer
to a function to be called when a particular item is selected.  I am a little
dense and/or the documentation on GTMENUITEM_GETUSERDATA() is a little scant.
Likely a little of both.  Could someone please provide an example of what the 
fuction call would look like?  

(*GTMENUITEM_GETUSERDATA(ItemAddress(Menu, (long)selection)))();
just doesn't seem to cut it with my compiler, and since cdecl doesn't
understand the cast in the GTMENUITEM_GETUSERDATA macro, I don't either.

Thanks for any help!
  
--
-Dale Larson  (dlarson@blake.u.washington.edu)
Technical Details
Message-ID: <9194@milton.u.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ogicse!milton!dlarson@blake.u.washington.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ogicse!milton!dlarson@blake.u.washington.edu
From: dlarson@blake.u.washington.edu (Dale Larson)
Newsgroups: comp.sys.amiga.tech
Subject: Accessing NewMenu UserData
Message-ID: <9194@milton.u.washington.edu>
Date: 14 Oct 90 20:40:04 GMT
Sender: news@milton.u.washington.edu
Organization: The Evergreen State College,  WA
Lines: 15