Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!eutrc3!rcbaem From: rcbaem@eutrc3.urc.tue.nl (Ernst Mulder) Newsgroups: comp.sys.mac.programmer Subject: Re: Problems with Lightspeed Pascal 2.0 Message-ID: <1397@eutrc3.urc.tue.nl> Date: 4 Jan 90 11:44:00 GMT References: Organization: Eindhoven University of Technology, The Netherlands Lines: 46 In article es2q+@andrew.cmu.edu (Erik Warren Selberg) writes: >Rich -- > >I have even MORE LSP problems for you... > >won't. for example... > repeat > modalDialog(myDlog,someFilter); > case itemhit of {that call to modalDialog was a bit screwy, btw} > ... > end; > until itemhit=ok; > >any stop in the loop won't. Hello Rich, I had a similar problem. I was using a construction like the one above, and my dialog-loop would end at moments I didn't want it to, my loop looked like this: repeat ModalDialog(myDialog, someFilter); case itemHit of {bla bla bla} ... end until itemHit in [OK, Cancel]; The loop would end when I pressed a certain button in the dialog. Even though this button wasn't OK nor Cancel. When in LS the program ran nicely and the loop would end ONLY when I pressed OK or Cancel. After building the application the loop would not only stop after pressing OK or Cancel, but would end too when pressing an other control item... My weird solution was to replace until itemHit in [OK, Cancel]; by: until (itemHit = OK) or (itemHit = Cancel); Now the program works, so I'm relatively happy :) But I'm still wondering what caused this??? Ernst. >