Accessing other stacks in LibCGI

Terry Vogelaar (de Mare) tvogelaar at de-mare.nl
Fri Aug 20 00:28:21 CDT 2004


Rodney Tamblyn heeft op vrijdag, 20 aug 2004 om 01:56 
(Europe/Amsterdam) het volgende geschreven:

> Hi Terry,
>
> You *think* (you'll need to check this) you can access data in custom 
> properties of stacks, but not fields, when the stack is accessed by 
> the command line engine.  e.g. you can start using a stack, and 
> execute a function that may (for example) retrieve data stored in a 
> custom property of the stack, but you cannot navigate to a card, get a 
> field etc.
>
> ~ Rodney

What you write seems to be correct.

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

>> I tried both of your solutions, but the problem doesn't seem to be 
>> loading the stack into memory. The test function
>> 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.
>
> When you say doesn't work you mean return empty or trigger error?
> Also check if the agenda stack is loaded, check if the card and the 
> control you want is there... use the "there is a" function. Try 
> refering them by the ID too...

It returns empty. If I check with 'if there is a cd cardnamevar', it 
evaluates false and the function returns what is in the 'else' part. 
Since I was very sure that there was a card with that name, I checked 
the name of the first card to find out in which stack it was searching. 
It returned the name of 'content', so it was just searching in the 
wrong stack.

I'll try a tip someone mailed me personally and if that doesn't solve 
anything, I put everything in a text file. That seems to be the 
simplest. And the simplest is often the best solution.

Terry



More information about the use-livecode mailing list