Re: [Pharo-users] Hard crash when teaching
So I was a bit annoyed about this behavior, because I still think it is a cool demo to show in class. So I had a poke around the system (Thanks Igor for pointing me in the right direction). What happens is that ImageMorph>>image: does at some point super extent: 2 * self borderWidth + image extent. where self borderWidth is an int. Now wait a minute, what does it mean, conceptually to sum an int with a point? I have no idea. So what are we doing here? Computing the extent considering the extra border size we have. So what we want to do is sum 2 points, now that does makes sense. super extent: (2 * self borderWidth) asPoint + image extent. With this fix, I can turn of coercion for Integers without any problem, fixing the original issue. Plus the behavior of ImageMorph>>image: is the same, as far as I can tell. Bonus: conceptually cleaner, more robust system, and the ability to do funky demos in class. See, I can do brain surgery, just not at the same time as teaching :-) (Marcus: this fix attached to the bug report, even though it is closed, just in case you consider it worthwhile ...) On 08 Oct 2010, at 09:07, Stéphane Ducasse wrote:
It depends on when you want to use that particular brain later to do real work or not ... :-P
;D _______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
participants (2)
-
Johan Fabry -
Stéphane Ducasse