----- Original Message ----- From: "J. Landman Gay" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com > _______________________________________________ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard > _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard