drew@cat46.CS.WISC.EDU (Shawn Drew) (03/03/89)
Ok, here's an easy question: How come when I put up a new dialog (telling the user that calculations are being performed) the dialog box never gets completely drawn? The outline is shown, but the contents are never drawn. It's kind of a waste to have an empty dialog box on the screen. We aught to make a newsgroup for really obvious mac programming questions like the above, as well as one for the really hard questions. Here's another, not-so-easy question. When I read individual strings from a big (around 300 entries) STR#, I eventually run into garbage, although they look fine in ResEdit. When I recently upgraded to a 2 meg machine, the problem disappears. Odd, wouldn't you say? BTW, I'm using LSP 2.0, System 6.0.2 on a 2 meg SE. Thanks for any light you can shed on these puzzles. ****** The opinions expressed in this article are my own ****** ********** Except those who belong to other people *********** drew@cat46.cs.wisc.edu
bob@accuvax.nwu.edu (Bob Hablutzel) (03/04/89)
> How come when I put up a new dialog (telling the user that calculations > are being performed) the dialog box never gets completely drawn? The > outline is shown, but the contents are never drawn. It's kind of a > waste to have an empty dialog box on the screen. Are you calling ModalDialog or DialogSelect to handle update events in the dialog window? > When I read individual strings from a big (around 300 entries) STR#, I > eventually run into garbage, although they look fine in ResEdit. When > I recently upgraded to a 2 meg machine, the problem disappears. Odd, > wouldn't you say? Are you possibly having problems with a dangling dereferenced pointer, which gets fixed when there is more memory cause the resource doesn't have to move? Bob Hablutzel Wildwood Software BOB@NUACC.ACNS.NWU.EDU
tim@hoptoad.uucp (Tim Maroney) (03/04/89)
In article <2383@puff.cs.wisc.edu> drew@cat46.CS.WISC.EDU (Shawn Drew) writes: > How come when I put up a new dialog (telling the user that calculations > are being performed) the dialog box never gets completely drawn? The > outline is shown, but the contents are never drawn. It's kind of a > waste to have an empty dialog box on the screen. You're not going back to your main event loop after bringing up the dialog, so the update on the dialog isn't getting done and the contents aren't being drawn. You can use DrawDialog to get around this problem. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "Something was badly amiss with the spiritual life of the planet, thought Gibreel Farishta. Too many demons inside people claiming to believe in God." -- Salman Rushdie, THE SATANIC VERSES
jamesm@sco.COM (James M. Moore) (03/07/89)
In article <2383@puff.cs.wisc.edu> drew@cat46.CS.WISC.EDU (Shawn Drew) writes: > When I read individual strings from a big (around 300 entries) STR#, I > eventually run into garbage, although they look fine in ResEdit. When > I recently upgraded to a 2 meg machine, the problem disappears. >BTW, I'm using LSP 2.0, System 6.0.2 on a 2 meg SE. Try installing a growzone procedure. It doesn't have to do anything fancy; mine usually just do DebugStr("\pneed more memory"). This caught me three bugs over the weekend. If you've got lots of space to play around in, your code might not be expecting to run out of room, and this will also let you know in case you make bogus memory management calls (NewPtr(34234344), or somesuch). (I'm running LSC on a 1 meg plus with the debugger active, so my programs don't even have room to breathe. One thing to keep in mind is that the debugger and gz procs don't seem to get along very well. I suspect this is due to lack of memory for me though, as the debugger partition is 100k, lsc is 350k, and my code gets about 160k.) -- ** James Moore ** ** Internet: jamesm@sco.com ** ** uucp: {decvax!microsoft | uunet | ucbvax!ucscc | amd}!sco!jamesm ** ** Nil clu no suim ar bith ag SCO ceard a bhfuil me ag scriobh anois. **