Yes this is an important bug do you have the cs of your little example? Stef
On May 19, 2010, at 9:17 PM, Carla F. Griggio wrote: > Just reproducing it would be helpful :O a friend of mine already > tested the code I attatched and saw the same problem. > > If you recall having a class with a method sending a message to super, > and a sublclass inheriting that method, you can try to reproduce it > there too debugging that message on an instance of the subclass. > > It's not easy to explain with words, that's why I made a little > package of code to illustrate the situation. > > The thing is that when printing the evaluation of a selected bunch of > code inside a debugger window (paragraphEditor?), if the code you're > evaluating is a message to super, and the class of the object you're > debugging is inheriting the method you're debugging, the printed > result will be wrong. In other words, the method lookup fails. > > This doesn't happen with normal excution of code (thank God!). > > I think this is an important bug, seeing those wrong results when > debugging can be very confusing. I spent hours feeling stupid last > Monday while debugging because I trusted those wrong results and > couldn't see where I was doing something wrong :P > > Cheers! > Carla > > On Wednesday, May 19, 2010, Mariano Martinez Peck <[email protected]> > wrote: >> Hi Carla. I would like to help you, but I have no idea. I could reproduce it. >> >> Maybe Lukas, Igor, Eliot etc can help you. I have no idea. >> >> Cheers >> >> Mariano >> >> 2010/5/18 Carla F. Griggio <[email protected]> >> Hi everybody! >> Well, maybe you are already aware of this... maybe not. I tried to find an >> issue about this and unless I didn't think of the right keywords, it's not >> there. >> >> >> >> I was debugging a template method and sudenly I found myself spending ours >> trying to find out why I got different results when printing the result of a >> message sent to super and when steping into that message and printing the >> (same) result there. >> >> >> >> Imagine this simple situation (I attatch the complete code and some tests so >> you can reproduce this): >> AverageTotalization inherits from Totalization.WeightedAverageTotalization >> inherits from AverageTotalization. >> >> >> >> Totalization>>total >> >> ^self summatory >> >> >> >> >> >> AverageTotalization>>total >> >> ^(super total) / self denominator >> >> >> >> >> >> AverageTotalization>> denominator >> >> ^values size >> >> >> >> >> WeightedAverageTotalization>> denominator >> >> "Weights is a dictionary" >> >> ^self weights values sum >> >> >> >> >> If I debug aWeightedAverateTotalization total and try to print super total >> in the debugger ParagraphEditor, I'll get this result: >> >> >> >> (self summatory / self denominator) >> >> >> instead of just: >> self summatory >> This only happens when I print or inspect or other do-its in the debugger >> window. The method lookup works OK when just >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
