Hi,
One of my models has a UUID stored in an instance variable.
It appears that the UUID is not always converted back to a real object. I'm using Seaside, and I often get walkbacks when dealing with this ivar. Specifically, I use this UUID to create a filename, using "(myUUID printString), '.rss'." The walkback shows that I am ending up with something like "a MagmaMutatingProxy .rss". When I examine the debugger, I find a MagmaMutatingProxy where I would expect to find my UUID.
If I open an explorer on the object, and click on the MagmaMutatingProxy, I will see the real UUID appear. After that happens, my application will run with no further problems (I am using Magma seasideHelper and I suspect that the reified object is cached).
If I replace my accessor method "^ uuid" with "^ uuid copy" everything seems to work correctly. So far that seems like a good workaround but I'd like to make sure I'm not doing something wrong. Is it possible that Magma is not always handling UUIDs correctly?
Thanks,
Jerry
Hi Jerry, what image are you using? It sounds to me like #printString was moved up to ProtoObject in your image. That's a bad idea, IMO; we should be moving things out of ProtoObject, not into.
Remember, the proxy's are supposed to be lightweight stand-in's for their real object, they are not supposed to be able to understand anything but a most minimal protocol. When it receives a message it does not understand itself, #doesNotUnderstand: is invoked on the proxy where it undergoes its transofrmation to the real object and forwards the message. Any messages which have been moved to ProtoObject will actually be understood by the proxy and therefore not undergo the transformation to the real object when those messages are sent.
I would make sure that #yourself is not implemented in ProtoObject either ,which would be a better message to force materialization than #copy.
- Chris
On Mon, Oct 13, 2008 at 7:58 AM, Jerry Bell jdbell@oxfordmetamedia.com wrote:
Hi,
One of my models has a UUID stored in an instance variable.
It appears that the UUID is not always converted back to a real object. I'm using Seaside, and I often get walkbacks when dealing with this ivar. Specifically, I use this UUID to create a filename, using "(myUUID printString), '.rss'." The walkback shows that I am ending up with something like "a MagmaMutatingProxy .rss". When I examine the debugger, I find a MagmaMutatingProxy where I would expect to find my UUID.
If I open an explorer on the object, and click on the MagmaMutatingProxy, I will see the real UUID appear. After that happens, my application will run with no further problems (I am using Magma seasideHelper and I suspect that the reified object is cached).
If I replace my accessor method "^ uuid" with "^ uuid copy" everything seems to work correctly. So far that seems like a good workaround but I'd like to make sure I'm not doing something wrong. Is it possible that Magma is not always handling UUIDs correctly?
Thanks,
Jerry
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
2008/10/13 Chris Muller asqueaker@gmail.com:
Hi Jerry, what image are you using? It sounds to me like #printString was moved up to ProtoObject in your image. That's a bad idea, IMO; we should be moving things out of ProtoObject, not into.
Remember, the proxy's are supposed to be lightweight stand-in's for their real object, they are not supposed to be able to understand anything but a most minimal protocol. When it receives a message it does not understand itself, #doesNotUnderstand: is invoked on the proxy where it undergoes its transofrmation to the real object and forwards the message. Any messages which have been moved to ProtoObject will actually be understood by the proxy and therefore not undergo the transformation to the real object when those messages are sent.
I would make sure that #yourself is not implemented in ProtoObject either ,which would be a better message to force materialization than #copy.
Btw, Cris, have you thought about creating own proxy without inheritance from ProtoObject , e.g.
Object subclass: #MyProxy. MyProxy superclass: nil.
Then you don't have to care about things like #printString or #yourself. This kind of proxy can be most transparent possible proxy in Squeak. Beyond that , it will require to modify VM to understand the concept of transparent proxies.
- Chris
On Mon, Oct 13, 2008 at 7:58 AM, Jerry Bell jdbell@oxfordmetamedia.com wrote:
Hi,
One of my models has a UUID stored in an instance variable.
It appears that the UUID is not always converted back to a real object. I'm using Seaside, and I often get walkbacks when dealing with this ivar. Specifically, I use this UUID to create a filename, using "(myUUID printString), '.rss'." The walkback shows that I am ending up with something like "a MagmaMutatingProxy .rss". When I examine the debugger, I find a MagmaMutatingProxy where I would expect to find my UUID.
If I open an explorer on the object, and click on the MagmaMutatingProxy, I will see the real UUID appear. After that happens, my application will run with no further problems (I am using Magma seasideHelper and I suspect that the reified object is cached).
If I replace my accessor method "^ uuid" with "^ uuid copy" everything seems to work correctly. So far that seems like a good workaround but I'd like to make sure I'm not doing something wrong. Is it possible that Magma is not always handling UUIDs correctly?
Thanks,
Jerry
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Btw, Cris, have you thought about creating own proxy without inheritance from ProtoObject , e.g.
Object subclass: #MyProxy. MyProxy superclass: nil.
Then you don't have to care about things like #printString or #yourself. This kind of proxy can be most transparent possible proxy in Squeak. Beyond that , it will require to modify VM to understand the concept of transparent proxies.
That would be a royal pain in the ass, it is difficult enough as it is getting ProtoObject derivatives to function and not break the image.
Unfortunately many things break if they dont have some minimum functionality. The object explorer being one thing. On occassion every object in the image is scanned and this breaks if the object doesnt implement some basics. These bits of code sh/could be improved.
#printString should reify the object, at least looking at the code in my image it should.
Keith
I had not considered doing that. It doesn't seem like a very high pay off in terms of my time and effort expended.. And Magma currently does not require any VM changes at the moment, to require it so would be another level of challenge for installers.
Regards, Chris
On Tue, Oct 14, 2008 at 7:03 PM, Igor Stasenko siguctua@gmail.com wrote:
2008/10/13 Chris Muller asqueaker@gmail.com:
Hi Jerry, what image are you using? It sounds to me like #printString was moved up to ProtoObject in your image. That's a bad idea, IMO; we should be moving things out of ProtoObject, not into.
Remember, the proxy's are supposed to be lightweight stand-in's for their real object, they are not supposed to be able to understand anything but a most minimal protocol. When it receives a message it does not understand itself, #doesNotUnderstand: is invoked on the proxy where it undergoes its transofrmation to the real object and forwards the message. Any messages which have been moved to ProtoObject will actually be understood by the proxy and therefore not undergo the transformation to the real object when those messages are sent.
I would make sure that #yourself is not implemented in ProtoObject either ,which would be a better message to force materialization than #copy.
Btw, Cris, have you thought about creating own proxy without inheritance from ProtoObject , e.g.
Object subclass: #MyProxy. MyProxy superclass: nil.
Then you don't have to care about things like #printString or #yourself. This kind of proxy can be most transparent possible proxy in Squeak. Beyond that , it will require to modify VM to understand the concept of transparent proxies.
- Chris
On Mon, Oct 13, 2008 at 7:58 AM, Jerry Bell jdbell@oxfordmetamedia.com wrote:
Hi,
One of my models has a UUID stored in an instance variable.
It appears that the UUID is not always converted back to a real object. I'm using Seaside, and I often get walkbacks when dealing with this ivar. Specifically, I use this UUID to create a filename, using "(myUUID printString), '.rss'." The walkback shows that I am ending up with something like "a MagmaMutatingProxy .rss". When I examine the debugger, I find a MagmaMutatingProxy where I would expect to find my UUID.
If I open an explorer on the object, and click on the MagmaMutatingProxy, I will see the real UUID appear. After that happens, my application will run with no further problems (I am using Magma seasideHelper and I suspect that the reified object is cached).
If I replace my accessor method "^ uuid" with "^ uuid copy" everything seems to work correctly. So far that seems like a good workaround but I'd like to make sure I'm not doing something wrong. Is it possible that Magma is not always handling UUIDs correctly?
Thanks,
Jerry
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
-- Best regards, Igor Stasenko AKA sig.
magma@lists.squeakfoundation.org