Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!orion.oac.uci.edu!teri.bio.uci.edu!bdugan From: bdugan@teri.bio.uci.edu (Bill Dugan) Newsgroups: comp.sys.mac.programmer Subject: Re: Scrap Manager and Multifinder Summary: possible problem #2 Message-ID: <2817CD38.23342@orion.oac.uci.edu> Date: 26 Apr 91 06:48:25 GMT References: <1991Apr16.115606.6398@ecmwf.co.uk> <13191@goofy.Apple.COM> Organization: University of California, Irvine Lines: 39 Nntp-Posting-Host: teri.bio.uci.edu In article <13191@goofy.Apple.COM> REEKES@applelink.apple.com (Jim Reekes) writes: >In article <1991Apr16.115606.6398@ecmwf.co.uk>, mab@ecmwf.co.uk (Baudouin Raoult) writes: >> >> >> I try to put a picture in the clipboard. It work >> fine except under Multifider. The stuff I put in the >> clipboard is there in my application, but if I select an >> other application, the clipboard is empty. Any clue ? > > >Under System 6.0.x, if the Finder runs low on memory it may clear the scrap. >I've seen this happen if a large picture was copied. When the Finder got >some background time, it finds itself low on memory and cleared the scrap. >Yes, it's very rude but it happens. > >Try setting an a-trap break on ZeroScrap and UnloadScrap to see if this is >happening on your scrap handle. > >Jim Reekes, Mac Toolbox Engineer A more probable fix: You must use a SystemEdit call just before the scrap call. Some code that works for me: if (SystemEdit(3)) ; err = PutScrap(GetHandleSize(h),'PICT',*h); Obviously, modify your PutScrap call so it works for your purpose. The reason is that apparently the SystemEdit call fools Multifinder into thinking that the user picked an option from the Edit menu and that it's "OK" to convert the scrap into the Multifinder scrap, which are apparently different things. This FEATURE was pretty tough to figure out and I'm not sure where I finally found it documented. Cheers, bill