David Bovill wrote:
> 
> Thanks Andu,
> 
> got it working (with your help). I had made a number of mistakes...
> 
>     1) The function had a mistake:
> 
> function getData
>    -- put return & fld 1 into someData
>   put return & fld 1 of stack "database" into someData
>   return someData
> end getData
> 
> Basic mistake, but as the script is being used, it had no idea of which
> stack the field was in - so a stack reference was needed. However you can
> call the functions direct (which is a relief for me 'coz my libraries are
> mainly functions).
> 
> Seem to be able to parameters in the expected way. However I've run into a
> problem which seems to be to do with the home stack... pretty sure it is not
> corrupted or anything as it works locally and I am using the same technique
> to transfer it as the other stacks... - I think it is *that* lovely splash
> screen -:)
> 
> Why would I want to use the home stack

Good question.

> - maybe I don't need to, but when
> exploring shell commands, I decided to see if I could use MC shell commands
> and call them from the CGI...
> 
> Stuff like (calling standard shell scripts on Linux serveer):
> 
>   -- put shell("whereis sh") after buffer
>   -- put return after buffer
> 
>   -- put shell("whereis mc") after buffer
>   -- put return after buffer
> 
>   -- put shell("whereis perl") after buffer
>   -- put return & return after buffer
> 
> Works a treat in the CGI, but when I tried to use MC based scripts...
> 
> First I got back that sh (the shell interpreter) couldn't handle it, so I
> needed to change the shellCommand...
> 
>   -- set the shellcommand to "mc"
> 
> to which I get back...
> 
>   -- ...mcPath: Can't open display
>   -- ...mcPath: Can't load stack or script mchome.mc
> 
> Which brings me on th the fact that with the home stack on the server and a
> couple of database stacks:
> 
>   -- put fld 1 of stack "database" into someData -- works fine
>   -- put fld 1 of stack "home" into someData -- gives a server error
> 
> So the question I am trying to answer is have I made another silly mistake
> or am I running into a brick wall as the home stack will not run on the
> server (display issue?) and consequently I won't be able to use MC based
> shell scripts?

You can if they are written to a .mt file.
% ./mc script.mt # will execute the script.
Doing:
% ./mc stack.mc #will try to open MC in X and not succeed.

> 
> Maybe I'll have to dig out that SSH Telnet client? Any help from the experts
> out there appreciated...
> 
> David
Andu

Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to