Go Stack
Phil Davis
phildavis at attbi.com
Wed Mar 20 00:42:01 EST 2002
----- Original Message -----
From: "J. Landman Gay" <jacque at hyperactivesw.com>
To: <metacard at lists.runrev.com>
Sent: Tuesday, March 19, 2002 9:15 PM
Subject: Re: Go Stack
> I wrote:
> >
> > I think I went astray
> > because I've done the stack-on-the-web thing in HC and I was looking for
> > similar behavior in MC, but I guess it isn't going to work.
>
> Whoa. I accidentally did it -- it does work. :) Very cool. I didn't have
> all the pieces together exactly right at any given time before.
>
> It looks like every reference to an object has to be a long reference. I
> was incorrectly using short references before.
You might be able to set "the defaultStack" to the target stack and then use short references - but I don't know for sure.
Phil
> Anyway, I ended up with this:
>
> on startup
> put $QUERY_STRING into theTerm
> put "" into buffer
> if theTerm = "" then
> put "No query submitted." after buffer
> else
> start using "mystack.mc"
> repeat with x = 1 to the number of cds of stack "mystack"
> get fld "title" of cd x of stack "mystack"
> if it contains theTerm
> then put it &" - " & fld "author" of cd x \
> of stack "mystack" & cr after buffer
> end repeat
> stop using "mystack.mc"
> end if
> if buffer = "" then put "No titles found." into buffer
> put "Content-Type: text/plain" & cr
> put "Content-Length:" && the length of buffer & cr & cr
> put buffer
> end startup
>
> So you have to loop through everything, checking each field and card,
> one at a time. The stack is fairly small so it doesn't take too long.
> Now I have to add in looping through all the fields, but now that the
> foundation is there that shouldn't be too hard.
>
> Thanks guys.
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>
More information about the metacard
mailing list