Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Gregory B. Lampshire
Fri, 09 Oct 1992 19:57
pasteboard problem---multiple copies from my app don't seem to take affect
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads