[Thread Prev][Thread Next][Index]

Re: How to add a new operation to return text file?



Hi Ding,

In your custom UI XML for the new operation, the mime type is part of the
values attribute to the menu (type=ops) item tag.
explained at
http://ferret.wrc.noaa.gov/Ferret/LAS/Documentation/manual/customize.html#User_Interface_behavior

where item values are "operation,format,numvars"

operation=operation name (perl subroutine)
format=mime type code (see server/LAS/Server.pm)
numvars=numvars required by operation (optional, default is 1)

<item values="matlab_test_method,txt,1">Matlab Test</item>

if you need to use add_mime(), then the operation part of the value string
should equal the 1st argument given to add_mime().

Joe
-------------------------------------
Chi Ding wrote:

> Hi all las users
>        I added a new new operation "MatlabTest" which is supposed to
> return a text file,
> into las, however when I called this operation through web browser, it
> created
> an html file which points to a non-existent gif file.
>        I added this line into custom.pl file
> add_mime('MatlabTest','text/plain');
>        but it didn't work either.
>        How to create an operation and make the auto-created html file
> pointing to a text file?
> Any body can help me?
>        Thanks a lot, Ding



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement