evaluate the "it" variable in an external

jbv jbv.silences at Club-Internet.fr
Sun Dec 21 16:35:18 EST 2003


Of course you can send messages to Rev objects
from within an external, and your example certainly
works...
But don't you think that, in this case, it's a bit
too tricky (if not perverse), especially for a simple
"ask" dialog which, above all, is called BEFORE
the external ?
Last but not least, such "tricks" are often pretty
hard to debug...

JB


> Correcting my own post:
>
> tested:
>
> void RevClipsAsk(char *args[], int nargs, char **retstring, Bool *pass, Bool *error)
> {
>         int     retval;
>         char    *actualResult="test";
>
>         SendCardMessage("put revClipsAsk() into global clipsResult", &retval);
>         actualResult = GetGlobal("clipsResult", &retval);
>         *pass = False;
>         *error = False;
>         *retstring = istrdup(actualResult);
> }
>
> from Transcript:
>
> function revClipsAsk
>   ask info "Your input:" titled "CLIPS input"
>   if it <> empty then
>     put it into clipsResult
>     return it
>   else
>     put the result into clipsResult
>   end if
>   return the result
> end revClipsAsk
>
> _______________________________________________
> 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