MC CGI - What can't I do?

Richard Gaskin ambassador at fourthworld.com
Tue Aug 27 01:00:01 EDT 2002


andu wrote:

> --On Monday, August 26, 2002 15:04:35 -0700 Richard Gaskin
> <ambassador at fourthworld.com> wrote:
> 
>> I've foound that MC as a CGI will let me create stack files on the serber
>> and use their custom props for data storage.  Way cool.
>> 
>> This has me thinking:  just whar can't I do faceless on a server?
>> 
>> For example, I know I can't take screen shots, but can I paint and export
>> JPEGs?
>> 
>> What general restrictions apply when running MC as a CGI?
> 
> I didn't figure them all out but I would assume anything having to do with
> the visual or audio for that matter are off limits to mt scripts since they
> most likely need libraries which are not available in this state.
> Also any reference to stacks ("...this stack", cards, custom properties
> etc.) are off limits.

Not entirely true, which is what got me so excited.  Here's some of what I
found:

- stack files can be created:
    create stack "tmp"
    set the filename of stack "tmp" to "tmp/formdata.mc"
  
- custom properties of stack files can be set:
    set the customproperties of stack "tmp/formdata.mc" to tInData

- paint tools do not generate an error:
    choose brush tool
    set the brushcolor to blue
    drag from 60,60 to 80,80
    select img 1 of stack "tmp/formdata.mc"
    export png to file "myimg.png"

- in the example above, the export command does not generate an error and an
image file is created, but the image is a solid-colored rectangle instead of
the painted image.


So it looks like we're limited to text processing only, with the added
benefit of using stack file properties for limited hierarchically-ordered
data.  A fair replacement for Perl, but such a frustratingly small subset of
what MC can do.

I understand the reasoning behind these limitations (had to try anyway --
after all, ignoring one of the early SC programmers is what led me to
discover that I could store binary data in its fields), but I can't help but
wonder if there's some way we could get graphics capabilities in MC CGIs in
the future....

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any Database on Any Site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the metacard mailing list