evaluate the "it" variable in an external

jbv jbv.silences at Club-Internet.fr
Sun Dec 21 10:02:39 EST 2003



Alex,

Yes, your solution makes sense (and should certainly works).
And yes, the use of revclipsAsk makes sense if your external
runs some task no matter if "it" is empty or not after the "ask"
dialog.

When reading your 1st email, I thought that things were happening
as follows :

external start
   some processing
   ask dialog
   more processing
external end

In that case, it would make sense to stop the external before the
"ask" dialog, return to Transcript for "ask", and then call the
external again for processing the content of "it".

JB


> Thanks JB- actually I'm going the other direction. Pulling answers into
> the external on the external's request, instead of pushing answers in
> via messages from transcript. I don't know if that makes sense. Here is
> what I'm currently doing though- and it works well enough:
>
> // the C
> result = EvalExpr("revclipsAsk()", &retval);
>
> // the transcript
> function revclipsAsk
>    ask info "Your input:" titled "CLIPS input"
>    if it <> empty then
>      return it
>    end if
>    return the result
> end revclipsAsk
>
> BTW if this looks like a strange use of EvalExpr it's because I'm
> writing a bunch of user functions for CLIPS, in C, that talk to the Rev
> engine and do things like evaluate expressios, get and set variables,
> send messages, etc.
>
> Alex Rice <alex at mindlube.com> | Mindlube Software |
> <http://mindlube.com>
>
> what a waste of thumbs that are opposable
> to make machines that are disposable  -Ani DiFranco
>
> _______________________________________________
> 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