Accessing other stacks in LibCGI

Terry Vogelaar (de Mare) tvogelaar at de-mare.nl
Thu Aug 19 14:24:55 EDT 2004


Andre Garzia heeft op donderdag, 19 aug 2004 om 19:16 
(Europe/Amsterdam) het volgende geschreven:

> I usually stick to using text files with libCGI, I never tried a 
> content stack like that. I would suggest you try one of these:
>
> First option:  Make agenda a substack of your mainstack, this way it 
> would load anyway.
>
> Second option: try using go invisible stack <filepath>, on your 
> libraryStack handler, load agenda this way, so when you need to 
> performe any command, it will be in memory.
>
> Tell me if you managed that.

I tried both of your solutions, but the problem doesn't seem to be 
loading the stack into memory. The test function
function functionInAgenda
   return "Works!"
end functionInAgenda
indeed returned the string, although it was in the other stack. But 
when I let the function return anything on a card, it refused.

But what you wrote in the first line might solve the problem as well. I 
don't really need to store this data in a stack! The content of 
'content' is more complex so I'd prefer to keep that in a stack, but 
the agenda can be an external text file or a custom property.

Thanks.

> On Aug 19, 2004, at 10:16 AM, Terry Vogelaar wrote:
>
>> Hi all,
>>
>> While LibCGI helped me a lot in building my website, there is one 
>> issue I can't resolve yet.
>>
>> I have a 'content' stack and I want to access information in another 
>> stack named 'agenda'. And I can't figure out how.
>> I tried:
>>
>> lock messages
>> start using "path/to/agenda.rev"
>> put functionInAgenda() into a
>>
>> That worked as long as I let functionInAgenda just return plain 
>> information. If I want to access a field on a card, it fails.
>>
>> I even tried:
>> put url 
>> "http://www.de-mare.nl/cgi-bin/form.cgi?stack=agenda&cmd=cmdinagenda" 
>> into a
>>
>> The space where the data should be inserted stayed empty, while the 
>> url itself worked OK in a browser.
>>
>> I also tried to mare agenda a substack of content an do:
>> put value("functionInAgenda()",stack "agenda") into a
>>
>> Same result. If I specify a card in "agenda" it can't be found. If I 
>> check the name of the first card, it gives the name of the first card 
>> of stack 'content' instead. If I add 'of stack "agenda"' it solves 
>> the problem in the development environment, but the webbrowser gives 
>> an infinite load time.
>>
>> Any suggestions?
>>
>> Terry
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> -- 
> Andre Alves Garzia  2004  BRAZIL
> http://studio.soapdog.org
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list