David Bovill wrote:
> 
> > From: andu <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Date: Mon, 16 Apr 2001 08:55:18 -0400
> > To: [EMAIL PROTECTED]
> > Subject: Re: Using stacks in MC CGI scripts...
> >
> > David Bovill wrote:
> >>
> >> -- start using stack "database.mc"  -- no problem but...
> >
> > Start using "database" should be enough.
> >
> >> -- put getData() into buffer -- error
> >
> > Be aware that the 2 stacks don't share local variables. One stack does
> > getData() and "returns" stuff, the other, gets stuff in "the result".
> >
> >>
> >> Now getData() is a very simple function in the stack script of the MC stack
> >> "database.mc" on the server - it just return "hello"

> Hi Andu...
> 
> I don't have two stacks... just the one and it is being "used" in the .mt
> script - by the "start using stack ..." line.

Same thing.

> 
> However i can't use any of the functions in this stacks script even though I
> can reference it's fields and data

So, the syntax is the problem.
 After you "start using" a stack do a handler in the stack not a
function.
In your .mt file:

...start using "database"
getMyStuff
put the result
...

In your stack script:

on getMyStuff
put getData() into buffer
return buffer
end getMyStuff

function getData()
#stuff
end getData

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