Modifying safeScope?
Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Organization | IT Innovation |
| Message-ID | <[email protected]> |
I found this a bit surprising... I guess safeScope can't be shared?
# scope.emaker
def someFunction() {
def evalContext := safeScope.newContext(0)
def tracelnNoun := safeScope.getScopeLayout().getNoun("traceln")
tracelnNoun.initFinal(evalContext, def _(x) { traceln("Goodbye") } )
}
safeScope["traceln"]("Hello from traceln")
someFunction()
safeScope["traceln"]("Hello from traceln")
$ rune scope.emaker
> Hello from traceln
...
> Goodbye
Bug?
--
Dr Thomas Leonard
IT Innovation Centre
2 Venture Road
Southampton
Hampshire SO16 7NP
Tel: +44 0 23 8076 0834
Fax: +44 0 23 8076 0833
mailto:tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]
http://www.it-innovation.soton.ac.uk