[Seaside] Weird behavior where writing to an instance variable
overwrites another instance variable instead
Yar Hwee Boon
hboon at motionobj.com
Fri Oct 15 06:40:53 CEST 2004
Hi all,
I'm reposting this here with an update, as it wasn't replied to in
squeak-dev, and I thought other Seaside users might have seen this before:
I'm getting a very weird behavior. Using Seaside, I have a method as below:
ACTransactionEditor>>addValidationError: aString
validationErrors
ifNil: [validationErrors := OrderedCollection new].
^ validationErrors add: aString
ACTransactionEditor (a subclass of WAEditDialog, for those who use
Seaside), inherits the instance variable
"decoration" from a superclass. I define a instance variable called
validationErrors. In the 3rd line of
#addValidationError:, the assignment to validationErrors actually assigns
to decoration instead, leaving
validationErrors unchanged. I went through the debugger a couple of times
and can swear to it happening. It
finally work snormally after I put a self halt into #addValidationError:.
After that, removing the self halt,
etc, the code still works (ie. I can't reproduce it anymore).
Update: when I create another WAEditDialog subclass, this same problem
happens again. Any one has experienced this? Thanks.
--
Regards
HweeBoon
MotionObj
More information about the Seaside
mailing list