OperatorTable addAssignOperator(":", "myAssignMethod")
"foo" : "bar"
That gives an error that a Sequence does not respond to ":" (":" is still being treated as a message, not an operator).
I think it should get evaluated to myAssignMethod("foo", "bar")
(since "foo" = "bar"
becomes updateSlot("foo", "bar")
), but it's not. However:
OperatorTable addAssignOperator(":", "myAssignMethod")
doString("\"foo\" : \"bar\"")
that does work properly, and myAssignMethod
gets called. So how do I get whatever processing happens on the code during doString()
to work in the main code of the file?