ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Aug/pasteboard

This is pasteboard in view mode; [Up]


Date: Sun 01-Sep-1989 15:14:34 From: Unknown Subject: Re: pasteboard In article <1989Aug31.201848.20892@alberta.uucp> Leigh Willard writes: >I am having trouble "pasting" to a view. I use the method > [pb readType:NXPostScriptPboard data:&data length:&length] >and when I print out 'data' to a file, sure enough, it is a bunch >of postscript code. When I send the code to the postscript >previewer 'YAP' I get what I want to be pasted. However, I am >not sure what to do to send the postscript code to my view. I >am trying the following: > [aView lockFocus]; > DPSWritePostScript(DPSGetCurrentContext(), data, length); > [aView unlockFocus]; >And I get the error: (actually, I get it many times) > DPS client library error: PostScript program error > %%[ Error: rangecheck; OffendingCommand: get ]%% One thing Yap does differently is to bracket the execution of the code with a save/restore pair, right around the DPSWritePostScript. You might try that. Where does the PS on the pasteboard come from? If it comes from the execution of copyPSCode:... method in some other method, then it is likely to contain some definitions that are there to make the printers happy. These definitions redefine some Display PostScript operators; thus, to assure that you don't destroy your environment too badly, and also to assure you don't have all these extra definitions occupying memory, you need the save/restore. Take a look at the Yap code (YapOutput.m). Ali Ozer, NeXT Developer Support aozer@NeXT.com >From: langz@asylum.SF.CA.US (Lang Zerner)
Date: Sun 31-Aug-1989 20:18:48 From: Unknown Subject: pasteboard I am having trouble "pasting" to a view. I use the method [pb readType:NXPostScriptPboard data:&data length:&length] and when I print out 'data' to a file, sure enough, it is a bunch of postscript code. When I send the code to the postscript previewer 'YAP' I get what I want to be pasted. However, I am not sure what to do to send the postscript code to my view. I am trying the following: [aView lockFocus]; DPSWritePostScript(DPSGetCurrentContext(), data, length); [aView unlockFocus]; And I get the error: (actually, I get it many times) DPS client library error: PostScript program error %%[ Error: rangecheck; OffendingCommand: get ]%% Any comments would be appreciated. leigh willard >From: dz@mango.ucsb.edu (Daniel James Zerkle)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.