Question about text cgis
Jim Ault
JimAultWins at yahoo.com
Thu Mar 30 20:59:11 EST 2006
> I can't make this work - from a text cgi, anyway, I assume because in
> a text cgi, there is no 'this card' or 'this stack'.
> I also tried having an empty stack in the cgi-bin directory, and
> setting it's script to a text file from the original text cgi, and
> then putting it in use, but this just got the same error as the
> previous approach...
Well, Mark, this is a new one for me. I thought that there always had to be
a 'stack' and at least one 'card'. Someone else will have to answer why
this cannot be done. I quickly built a little stand alone that sets the
script of 'this card', goes to the next, etc, etc. No problem. Compiles
and executes on the fly as I would expect.
Are you sure you cannot set the script of 'this card' to the word 'cat' or
something simple? Perhaps you have tried to set it to a handler that cannot
be compiled and the error message you happen to get is 'no such card'
Try a single word or phrase that Rev does not think is a handler.
Then try a simple handler like
"on test" & cr & "answer the number of this card" & cr & "end test"
As I said, I have not seen this technique fail, but I am not a well-traveled
guru, so I will learn yet another lesson :-)
Jim Ault
Las Vegas
On 3/30/06 5:32 PM, "Mark Smith" <mark at maseurope.net> wrote:
> I can't make this work - from a text cgi, anyway, I assume because in
> a text cgi, there is no 'this card' or 'this stack'.
> I also tried having an empty stack in the cgi-bin directory, and
> setting it's script to a text file from the original text cgi, and
> then putting it in use, but this just got the same error as the
> previous approach...
> So I can't see how we could include a library text file, maybe we're
> stuck with having to use a library stack.
> However, a stack is only going to be about 4k bigger than a text file
> containing the same script.
> Out of curiosity, what's the objection to putting a stack in use from
> a text cgi?
>
> Mark
>
> On 30 Mar 2006, at 21:24, Jim Ault wrote:
>
>> Try these steps :
>>
>> put "script01"&".txt" into FN
>> put "c:/my documents/" into pathh
>> set the script of this card to url ("file:" & pathh & FN)
>>
>> --or the script of button 22, etc.
>>
>> set the script of this card to ""
>>
>> --adding to the stack script would be
>> get the script of this stack
>> set the script of this stack to it & cr & url ("file:" & pathh & FN)
>>
>> --more elaborate
>> put the script of this card into origCdScript
>> get url ("file:" & pathh & FN) & cr & origCdScript
>> set the script of this card to it
>> --call handler
>> set the script of this card to origCdScript
>>
>> --alternative
>> put " origCdScript"&".txt" into FN
>> put "c:/my documents/" into pathh
>> put the script of this card into url ("file:" & pathh & FN)
>>
>>
>> Jim Ault
>> Las Vegas
>>
>> On 3/30/06 12:25 PM, "jbv" <jbv.silences at club-internet.fr> wrote:
>>
>>> Hi list,
>>>
>>> I have a blank : I'm looking for a way to "include" external handlers
>>> in a text-based cgi script and can't find a way to do that...
>>> Here's what I mean : let's say I have a handler that performs a
>>> specific
>>>
>>> task ("on myTask") that I want to use in various cgi scripts. Of
>>> course
>>> I can paste it in every script after the "on startup / end startup"
>>> handler,
>>> but it would be more convenient if it were an external file and to
>>> just
>>> call it from each script, just like "#include" for libraries in C, or
>>> "require_once" in php etc.
>>>
>>> I see how to do it with cgi stacks, but is there a way to do that
>>> with
>>> text-based scripts ?
>>>
>>> Thanks,
>>> JB
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list