Article View: comp.sys.next.programmer
Article #1375pasteboard problem---multiple copies from my app don't seem to take affect
From: Gregory B. Lampshire
Date: Fri, 09 Oct 1992 19:57
Date: Fri, 09 Oct 1992 19:57
48 lines
1798 bytes
1798 bytes
I am compositing an image into view. I want to copy just that image into
the pasteboard. The code below shows what I am doing. What happens
unfortunately, is that even when the image itself has changed (which I
know for sure), the pasteboard seems stuck with only the first copy to the
pasteboard that I made. Further copies to the pasteboard from the same
program do not seem to affect its contents and I can only paste the same
image from the one application.
Any pointers about what I am doing wrong would be helpful.
// pb is created with pb=[Pasteboard new] in initFrame:: above
- copy: sender
{
int i, length, maxlength=10000;
char *data;
id aList, anImageRep;
// only want to copy EPS image data
aList = [imageid representationList];
anImageRep = nil;
for(i=0;i<[aList count]; i++)
if([[aList objectAt: i] class] == [NXEPSImageRep class])
anImageRep = [aList objectAt: i];
if(anImageRep==nil) return self;
[pb declareTypes: &NXPostScriptPboardType num: 1 owner: sender];
[anImageRep getEPS: &data length: &length];
[pb writeType:NXPostScriptPboardType data:data length:length];
return self;
}
--
Gregory Lampshire
Virginia Tech
Bradley Department of Electrical Engineering
gbol@rglnext.geol.vt.edu (NeXTmail welcome)
------------------------
My opinions are my very own and do not reflect the opinions of any
employer
Technical Details
Message-ID:
<8003@vtserf.cc.vt.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!vtserf!rglnext.geol.vt.eduShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vtserf!rglnext.geol.vt.edu From: gbol@rglnext.geol.vt.edu (Gregory B. Lampshire) Newsgroups: comp.sys.next.programmer Subject: pasteboard problem---multiple copies from my app don't seem to take affect Message-ID: <8003@vtserf.cc.vt.edu> Date: 9 Oct 92 19:57:46 GMT Sender: usenet@vtserf.cc.vt.edu Reply-To: gbol@rglnext.geol.vt.edu Lines: 48