[e-lang] Modifying safeScope?

Thomas Leonard tal at it-innovation.soton.ac.uk
Mon Feb 22 03:14:38 PST 2010


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 at it-innovation.soton.ac.uk
http://www.it-innovation.soton.ac.uk 



More information about the e-lang mailing list