davidr@searchtech.com (David Resnick) (03/27/91)
I'm using MPW C++ and am having a huge amount of trouble doing something which seems like it should be fairly easy. I'm new to the MacIntosh, but I have read most of Inside MacIntosh vol. I, and feel like I should be able to do some stuff now. I want to draw a picture from a PICT file in a window. Unfortunately, when I get to the call to DrawPicture, I get an alarm box with "The application TEST has unexpectedly quit(2)." TEST is the name of my program. As far as I can tell from Inside MacIntosh, Elements of Mac Programming by Dan Weston, and various other books, it should work, but it doesn't. An interesting twist occurs when I try to added some stuff that write a debug messages to an ostrstream just before the call to DrawPicture. The program then suddenly works okay, with the picture appearing in the window that the debug message goes to. Does this ring a bell with anyone? Can anyone supply me with a simple little working MPW C++ example program that performs this task so that I can see if I'm missing something simple? After more than two days of trial and error, I'm becoming just a little frustrated. Many thanks in advance. -- David E. Resnick davidr@srchtec.uucp (registered) search technology, inc. davidr@searchtech.com 4725 peachtree corners cir., suite 200 {uupsi,stiatl}!srchtec!davidr norcross, georgia 30092 (404) 441-1457
Louis.Pecora@f421.n109.z1.Fidonet.Org (Louis Pecora) (03/28/91)
I don't have a solution for you, but I strongly urge you to read the book Macintosh Programming Primer by Mark and Reed, which is a nice introduction to Mac Programming in C (Think C, but you should be able to easily convert to MPW C (and therefore C++)). They have several examples which seem to be just what you're trying to do. --- Lou Pecora * Origin: Twilight Clone: Macintosh Files - 301-946-8677 (1:109/421)