[Vm-dev] Problem with Proxies, objects and MethoDict
Mariano Martinez Peck
marianopeck at gmail.com
Tue Sep 28 20:29:13 UTC 2010
Hi folks. I am trying to do something and I found a VM crash. Suppose I want
to swap out a class, do a become with a proxy (that with the DNU will load
the class back). In addition, I have instances of the swapped class.
Example of code (will crash in the last line):
o := MyObject new.
o foo: 123.
p := ClassProxy new.
p become: MyObject.
o == nil.
My Object just extends Object, has an instVar 'foo', and implements the
className := aClass name.
super become: aClass
| reloadedClass |
(FileStream fileNamed: className, '.st') fileIn.
reloadedClass := Smalltalk at: className.
self becomeForward: reloadedClass.
^aMessage sendTo: reloadedClass
So....does someone know why the crash?
how can I solve it ?
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev