Re: cgdisplay [message #90794 is a reply to message #90793] |
Thu, 16 April 2015 06:01   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Sverre Solberg writes:
> I started using David's cgdisplay a year or two ago. Now, when trying
to run the same program it crashes and I get an error message:
> Traceback Report from CGDISPLAY:
>
> % Expression must be a structure in this context: PS_STRUCT (_$FSC_PS_START_).
> % Execution halted at: CGDISPLAY 288 cgdisplay.pro
> % $MAIN$
>
> I guess I have downloaded a new version of the coyote lib since then and I see from the header that the last bug fix concerned the use of encaps postscript with a portrait aspect ratio and that's exactly my situation. However, it seems as I'm now not able to use the cgdisplay with a ps device at all. These two commands
> set_plot,'ps'
> cgdisplay,xsize=2000,ysize=1000
>
> give exactly the samme error message. Am I doing something wrong or is it a bug? The crash occurs here (and it's the 'else'-part that's true). It seems ps_struct is not defined as a struc(?)
> IF N_Elements(ps_struct) NE 0 THEN BEGIN
> keywords = cgPSWindow(AspectRatio=Float(pysize)/pxsize, Landscape=ps_struct.landscape)
> ENDIF ELSE BEGIN
> keywords = cgPSWindow(AspectRatio=Float(pysize)/pxsize)
> ps_struct.landscape = keywords.landscape
> ENDELSE
I think it is a bug. The line just before the ENDELSE should be removed.
I'll do so now, but I don't have time this morning to check it in. I'll
do it when I get back from work.
Thanks for catching this.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|