Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!husc6!maymudes@husc4.UUCP From: maymudes@husc4.UUCP (David Maymudes,,,4982298) Newsgroups: comp.sys.mac.programmer Subject: Re: NeedHelpWithNumfilter Message-ID: <1650@husc6.harvard.edu> Date: 18 Apr 89 17:40:52 GMT References: <12863@swan.ulowell.edu> Sender: news@husc6.harvard.edu Reply-To: maymudes@husc4.UUCP Lines: 36 From article <12863@swan.ulowell.edu>, by jkeegan@hawk.ulowell.edu (Jeff Keegan): > > As of recently I have started to do my Mac programming using Lightspeed C > (I formerly was using Lightspeed Pascal). In writing a program recently > I have run into a problem that I can't seem to solve on my own. > I want to create a dialog box (done), read it in and display it (done), > and call ModalDialog with a function called "numFilter" as the filter > procedure. I've managed to get it to work as far as running the filter > routine every time. [...] > I've tripple checked the numfilter call.. It's something like > > Boolean numFilter (thediag,theevent,itemH) > DialogPtr thediag; > EventRecord *theevent; > Handle *itemH; > Quite possibly, this should be declared as: pascal Boolean numFilter (thediag,theevent,itemH) ^^^^^^ LightSpeed C uses this convention to say that the function should use Pascal calling conventions, required for any function called by the Toolbox. I don't know what method other brands of Macintosh C use for this; the book referred to in the original article may have been written with some other in mind. --David Maymudes --David Maymudes maymudes%husc4@harvard.ARPA maymudes@husc4.harvard.edu maymudes@husc4.UUCP maymudes@HARVUNXU.BITNET ..{seismo, harpo, ihnp4, linus, allegra, ut-sally}!harvard!husc4!maymudes davidm@harvarda.BITNET