Issue 6039 in pharo: The PolygonMorph raise SubscriptOutOfBounds due deletion of the last point

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 6039 in pharo: The PolygonMorph raise SubscriptOutOfBounds due deletion of the last point

pharo
Status: New
Owner: ----
Labels: Milestone-1.4 Type-Bug

New issue 6039 by [hidden email]: The PolygonMorph raise  
SubscriptOutOfBounds due deletion of the last point
http://code.google.com/p/pharo/issues/detail?id=6039

After current changes in the Morph class, handleMouseUp: method has this  
call at the last line:
"self eventHandler ifNotNil: [:handler | handler mouseUp: anEvent  
fromMorph: self ]"
So if a morph use "on: ..." mechanics like the PolygonMorph does, this line  
always fire a class EventHandler.

For the bad luck, just before, it is the call: "self mouseUp: anEvent.".

And the default mouseUp: method of the Morph class, also contain the same  
EventHandler call.

So the "on:.." method called twice, and the PolygonMorph is trying to  
delete already deleted vertex.

I am not the big specialist in the morphic event system, so cant propose  
the right changes. Nevertheless something should be done with this. :)




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6039 in pharo: The PolygonMorph raise SubscriptOutOfBounds due deletion of the last point

pharo

Comment #1 on issue 6039 by [hidden email]: The PolygonMorph raise  
SubscriptOutOfBounds due deletion of the last point
http://code.google.com/p/pharo/issues/detail?id=6039

Can you have a snippet of code showing the problem because so far I'm lost.




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6039 in pharo: The PolygonMorph raise SubscriptOutOfBounds due deletion of the last point

pharo

Comment #2 on issue 6039 by [hidden email]: The PolygonMorph raise  
SubscriptOutOfBounds due deletion of the last point
http://code.google.com/p/pharo/issues/detail?id=6039

Here it is.
The fresh today oneclick installation. In the workspace executed:

PolygonMorph new makeOpen; beStraightSegments; position: 10@10;  
toggleHandles; openInWorld

Just drop the topmost circle on the next one to delete a vertex, and  
get "Subscript out of bounds"



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker