[REBOL] Re: Hack
From: sunandadh:aol at: 30-Dec-2001 15:52
> I forgot the un-named func, the new version of hackme follow this message.
Another case of unnamed functions is VID action facets.
Here I've adapted you code to work in that case, I don't know if there is
another way to specify a /local in a Vid action facet, but I've used 'Use to
get the same effect. otherwise, it's all your code.
view layout [
button "Print me" [ use [err myself] [
error? err: disarm try [2 / 0]
either word? myself: get in err 'where [
print ["My name is:" :myself]
myself: get myself
print "Not called using a word"
"My body is:" mold second :myself
"^/My spec is:" mold third :myself
] ; action
Though it would be kinda neat if the Face was assigned to a variable and the
code could print that variable name!
Print-Button: Button "Print me" [...?code?...]
Prints "My name is Print-Button/Action"
But that's beyond my skills