Path: utzoo!attcan!uunet!samsung!think!linus!cws From: cws@mbunix.mitre.org (Christopher C. Wilder-Smith) Newsgroups: comp.sys.mac.programmer Subject: PICTures to scrap and to files Message-ID: <103554@linus.UUCP> Date: 20 Mar 90 19:30:37 GMT Sender: news@linus.UUCP Organization: The MITRE Corp., Bedford, MA Lines: 55 I am trying to put a series of saved pictures onto the clipboard, but it doesn't seem to work just right. Basically I draw a series of objects and save each one as a picture in a linked list. When I have to do a window update I traverse the list to redraw everything. That works fine, however, when I do a copy or a cut operation it is flakey, sometimes it appears on the clipboard, sometimes only one object appears, most often none. IM says to turn off saving the picture when doing other ops you don't want to save but that doesn't supply a ClosePicture() which is needed for a DrawPicture to work for a window update, for instance. How is this typically done? The scrap manager claims that you can continue to put similar object types onto the clipboard with PutScrap and they will just be appended, however, this doesn't seem to work. It doesn't appear that I'm using too much memory or anything of that sort. Here's a short code segment of what I'm doing if ( ( error = ZeroScrap()) == noErr) { for (p = head; p != NULL; p = p->next) { if ( (error = PutScrap(GetHandleSize(p->thePic), 'PICT', *(p->thePic))) != noErr) { SysBeep(1); /* do nothing for now! */ } else { ... } } } Anyhelp is appreciated! Thanks, Chris ================================================================================ -- -------------- -- --- Christopher C. Wilder-Smith ------------ Everything serious is --- ---- The MITRE Corporation ---------- difficult and almost ---- ----- Burlington Road -------- everything is serious ----- ------ Bedford, Massachusetts 01730 ------ ------ ------- cws@mbunix.mitre.org ---- ------- -------- -- -------- ================================================================================ -- ================================================================================ -- -------------- -- --- Christopher C. Wilder-Smith ------------ Everything serious is --- ---- The MITRE Corporation ---------- difficult and almost ---- ----- Burlington Road -------- everything is serious ----- ------ Bedford, Massachusetts 01730 ------ ------ ------- cws@mbunix.mitre.org ---- ------- -------- -- -------- ================================================================================