Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: List Manager Problem Message-ID: <6704@hoptoad.uucp> Date: 8 Mar 89 20:57:40 GMT References: <11032@ut-emx.UUCP> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Distribution: usa Organization: Eclectic Software, San Francisco Lines: 40 In article <11032@ut-emx.UUCP> newman@ut-emx.UUCP (David Newman) writes: >I am trying to put a scrolling list into a modal dialog; >the problem is that my repeat loop goes 10 or 12 times >and then a system error of some kind occurrs. MacsBug >says that the program counter is 0 at this point. > >My repeat loop looks like this: > >repeat > modalDialog(@listFilter,itemHit); >until itemHit = OK; > >The filter proc isn't doing anything because this happens >when I just start the dialog and wait, and it ignores all >but mouseDown and keyDown events. This code is obviously fine, so it must be something in your listFilter procedure or in the dialog initialization code. One thing that springs to mind is that it's safest to do all list operations (especially LNew) with the current port set to the owner window of the list. Maybe if you post the dialog initialization code and the filter procedure someone would be able to help you. I have used lists in modal dialogs many times and I haven't encountered this problem. >Alternately, I seem to get an ADDR ERR 00000001. Does >this mean that I am trying to address something at byte 1? >I'm not sure how many times the repeat loop goes in this >case. It means you are (or the system is) trying to treat 1 as a word or longword pointer, violating the 68K alignment requirements. It wouldn't be surprising if this were related to your jump to zero problems. One thing you can do when you jump to zero is look at the stack to see where you've just come from in your (or the system's) code. When you get an address error, look at the current PC to see where you were trying to use the bad address. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "Satanic is merely the name they give to the behavior of those who would disrupt the orderly way in which men want to live." -- Gabrielle, THE VAMPIRE LESTAT, Anne Rice