I was looking at parse examples from one of Nick's documents and came across the one shown below. The parsing I understand, but I am confused about the "call" function. If that "call" function is taken out, then every time a field is validated I get the standard REBOL security question. I suppose that is because the script is trying to access a folder outside of where it is running, which makes sense, but what I don't understand is why the "call" function stops that from happening.
Thank you.
R E B O L []
nums: charset "0123456789"
alfs: charset [#"a" - #"z" #"A" - #"Z"]
call "" ;; Without this we get the security alert.
validate: func [
f
rule
] [
if not parse f/text rule [
attempt [
insert s: open sound:// load %/c/windows/media/chord.wav
wait s
close s
]
]
]
view layout [
f1: field "12345678" [validate face [8 nums]]
field "1234" [validate face [4 nums]]
field "(555)123-2345" [validate face ["(" 3 nums ")" 3 nums "-" 4 nums]]
field "me@url.com" [validate face [some alfs "@" some alfs "." 3 alfs]]
do [focus f1]
]