LCB: (extension: error occured with domain) near "runtime", char 8

Stephen MacLean smaclean at madmansoft.com
Wed Feb 24 16:08:40 EST 2016


> On Feb 24, 2016, at 3:49 PM, Stephen MacLean <SMACLEAN at MADMANSOFT.COM> wrote:
> 
> 
>> On Feb 24, 2016, at 1:50 PM, Peter TB Brett <peter.brett at livecode.com> wrote:
>> 
>> On 24/02/2016 18:40, Stephen MacLean wrote:
>> 
>>> Now, calling the function, I get the error:
>>> 
>>> execution error at line 4 (extension: error occured with domain) near "runtime", char 8
>> 
>> This error is caused by an error thrown from "execute script".  Usually LCB errors are a bit more useful.
>> 
>>> [snip]
>>> 
>>> I have the extension of GitHub:
>>> 
>>> https://github.com/renegadesteve/rsIsValid/blob/development/rsIsValid.01.lcb <https://github.com/renegadesteve/rsIsValid/blob/development/rsIsValid.01.lcb>
>> 
>> You need to make sure that the e-mail address and regular expression are surrounded by quotes when constructing your script.
>> 
>>                                  Peter
> 
> 
> I changed it to:
> 
> put "^[A-Z0-9._%+-]{1,64}@(?:[A-Z0-9-]{1,63}\\.){1,125}[A-Z]{2,63}$" into tRegex
> put "filter \q" & pEmail & "\q with regex pattern \q" & tRegex & "\q into tMatch" into tScript
> 
> And am still getting the same error. Sorry, I’m not sure what I’m missing here.
> 

Ok, as I thought, I am dense!

Last line needs to be:

put "filter \q" & pEmail & "\q with regex pattern \q" & tRegex & "\q into tMatch;return tMatch" into tScript

You need to return the result to the extension, DUH!

Thanks for the help Peter!

Steve






More information about the use-livecode mailing list