Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!cs.utexas.edu!rutgers!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!ml10+ From: ml10+@andrew.cmu.edu (Michael A. Libes) Newsgroups: comp.sys.mac.programmer Subject: Re: Notification Manager question Message-ID: <0bFh_6W00Uh7017ZMC@andrew.cmu.edu> Date: 18 Nov 90 18:27:18 GMT References: <1990Nov18.005651.893@jarvis.csri.toronto.edu> Distribution: na Organization: Class of '91, Carnegie Mellon, Pittsburgh, PA Lines: 24 In-Reply-To: <1990Nov18.005651.893@jarvis.csri.toronto.edu> >When, the response procedure is called, the parameter passed in is a >QElemPtr. This QElemPtr of the response procedure should point me somehow >to the original NMRec where I stored my globals, but I am unsure how. > >If anyone knows how I should access my NNRec please email me or post news. The OS never copies your NMRec, it just adjusts the first three fields which happen to be the same or all OS queues. Therefore you can have as much data after the first three fields as you wish. There are two ways to pass variables to your callback routine. The first way is to create a new record whose first field is a NMRec and other fields are your required globals. For NMRecs, however, Apple provides an extra field for your use. The last field of the nmRec is: nmRefCon: LONGINT; {for application use} Put a pointer (or handle) to your globals, or a pointer to a struct containing the globals you plan on using in the nmRefCon. ------------------------------------------------------------------ Michael Libes (Luni) Internet Address: MacMach Project ml10@andrew.cmu.edu Carnegie Mellon University ------------------------------------------------------------------