Xref: utzoo comp.sys.mac:23820 comp.sys.mac.programmer:3482 Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!deimos!uxc!tank!ncar!ames!xanth!nic.MR.NET!shamash!nis!ems!srcsip!pavo!mnkonar From: mnkonar@pavo.SRC.Honeywell.COM (Murat N. Konar) Newsgroups: comp.sys.mac,comp.sys.mac.programmer Subject: Re: PPostEvent Message-ID: <13204@srcsip.UUCP> Date: 10 Dec 88 02:43:57 GMT References: <13103@srcsip.UUCP> Sender: news@src.honeywell.COM Reply-To: mnkonar@pavo.UUCP (Murat N. Konar) Distribution: na Organization: Honeywell Systems & Research Center, Camden, MN Lines: 35 Summary:I figured it out. A couple of days I ago I posted a request foor info on the proper use of PPostEvent. I figured it out myself last night with help from the LightsBug debugger in LSP 2.0. What a grovin' product. And I like the automatic pretty printing, always have, always will. But I digress. The qEl that PPostEvent returns to you in its var parameter is not really the event record that corresponds to the event you just posted. Rather it seems to be the event ahead of the one you really want. You can get to the event record you want by defreferencing the qLink field of the event record returned by PPostEvent. A code fragment is worth a thousand words. __________________________________________ PROCEDURE PostMyEvent( h,v :integer); VAR theErr: osErr; qEl: evQEl; {This procedure posts a mouseDown event at the given coords} BEGIN theErr := PPostEvent(mouseDown, 0, qEl); qEl.qLink^.evQElem.evtQWhere.h := h; qEl.qLink^.evQElem.evtQWhere.v := v; END;{PostMyEvent} Hope this does someone some good. ______________________________________________________________________ Have a day. :^| Murat N. Konar mnkonar@pavo.UUCP Honeywell Systems & Research Center, Camden, MN