It seems like this type of mistake keeps coming up.  I've hit it myself more than 
once.  Your problem is that replaceText is a function, not a command.  You have to use 
it in an expression.  For example,

    get replaceText((line n of textToParse),"red","blue")
  --^^^

To Rev documentation folks:

Given the subtle distinction between commands and functions, I think it would be a 
good idea in the Rev documentation to give examples only of usage in proper context.  
That is, please don't show functions alone on a line in a way that makes them look 
like commands.

I also think, given the apparent frequency of this problem, that the error message 
could be more helpful.  For instance, if Revolution is going to complain about 
"factors", it would be nice to explain what a factor is, and give us a hint about what 
might be wrong.

More generally, some documentation about what error messages mean and common causes of 
errors would be very useful.

Thanks

RR


Mike McManus wrote:

> Why does the line
>
> replaceText((line n of textToParse),"red","blue")
>
> always generate the error:  Expression: missing ')' before factor. The
> error comes up with or without the internal parans, and if I use a
> variable instead of a chunk. I even get it when I use a simple quoted
> string.
>
> What am I missing here. It seems I ran into this before using one of the
> search or replace commands and I ended up using another command. But I
> really need the regex here.
>
> ideas?
>
> Oh...II love having hyercard tools back in my life. Thanks!!!
>
> _______________________________________________
> use-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to