Oleg et al.,

On Wed, Jan 28, 2009 at 23:05, Oleg Kobchenko <[email protected]> wrote:
>> From: Hamish Harvey <[email protected]>
>> On Wed, Jan 28, 2009 at 05:23, Oleg Kobchenko wrote:
>> >> From: M.Shimura
>>
>> > To suppress dialog, try
>> >
>> >   erase <'EPSREADER_j_'
>> >
>> > before displaying the plots to be saved.
>>
>> I've wondered this before, and that will probably be a useful
>> incantation, but it looks, to the untrained eye, rather brutal. Can
>> you give a hint as to how it works? Is nothing else affected?
>
> If this truly matters, I encourage to discover
> the answer yourself.

Ahem. Quite so. I do apologise.

In exploring this, I found some inconsistencies between EPSREADER_j_
and PDFREADER_j_ on unix-like systems (I'm on Mac OS X).

I think the intended behaviour is this:

*READER_j_ does not exist: silently create file
*READER_j_ names a non-existent binary (empty string is default):
create file and open "done" dialog
*READER_j_ names an existent binary: open file using that program

So on Max OS X,

PDFREADER_j_ =: 'open'      NB. file saved as a PDF is opened in Preview

Two snippets from j602/system/classes/plot/jzplot.ijs :

if. 0 = 4!:0 <'EPSREADER_j_' do.
  if. check_epsreader EPSREADER_j_ do.
    wd 'winexec *',EPSREADER_j_,' ',file
  else.
    info 'File written: ',file
  end.
end.
)

if. 0 = 4!:0 <'PDFREADER_j_' do.
  if. IFUNIX do.
    hostcmd (dquote PDFREADER_j_),' ',dquote file
  else.
    wd 'winexec *',PDFREADER_j_,' ',dquote file
  end.
end.
)

The verb check_pdfreader exists but is not called from within
j602/system/classes/plot/jzplot.ijs.

So naming an existent viewer binary in PDFREADER_j_ works, but doing
the same in EPSREADER_j_ does not, and no setting of PDFREADER_j_ will
result in a dialog being opened.

Hamish

-- 
Hamish Harvey
Research Associate, School of Civil Engineering and Geosciences,
Newcastle University
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to