[Etoys-notify] [JIRA] Commented: (SQ-163) PolygonMorph issues

jira at immuexa.com jira at immuexa.com
Tue May 12 14:53:36 EDT 2009

     [ http://tracker.immuexa.com/browse/SQ-163?page=comments#action_34626 ]
Jerome Peace commented on SQ-163:

Hi Antonio,

There are a lot of integration bugs in squeak and you seem to have found another one. Good catch.

Please put the text and curves problem in its own its own report. (Link to the other reports that involve polygons). Let it be a separate issue. Trying to fix too much at once leads to difficulties in testing the fix.

Yours in curiosity and service, --Jerome Peace

> PolygonMorph issues
> -------------------
>          Key: SQ-163
>          URL: http://tracker.immuexa.com/browse/SQ-163
>      Project: squeakland
>         Type: Bug
>   Components: etoys
>     Reporter: team
>     Priority: Eventual
>      Fix For: M3: summer beta (july)
>  Attachments: PolygonFix-kfr.cs, PolygonFix-tetha.1.cs, PolygonMorph-updateHandles.st, polygonRepairs-wiz.5.cs
> From  Ticket #9277 (antonio, feb 2009)
> etoys-dev-4.0 till 2206 cs, linux debian O.S.
> etoys mode,
> object Curve (basic category) is a PolygonMorph, an instance show a vertices count=3 by default, but if you try to modify this number the PolygonMorph does not understand makeVertices:
> with "remove all vertices but cursor" sometimes I get an EvaluationError and sometimes I get a PreDebugWindow also
> polygonRepairs-wiz.5.cs (11.8 kB) - added by ScottWallace 11 days ago.
> PolygonFix-tetha.1.cs (2.7 kB) - added by ScottWallace 11 days ago.
> (antonio) I analyzed it more deeply:
> 1.- create an instance of Curve (Basic categorie at Object Catalog)
> 2.- Halo > Menu > Show handles with it
> 3.- open its Viewer and look for "vertices", you'll find: remove all vertices but cursor
> Run this command once, then I get an EvaluationError
> 1.- create an instance of Curve (Basic categorie at Object Catalog)
> 2.- open its Viewer and look for "vertices", you'll find: remove all vertices but cursor
> Run this command once
> 3.- now that you have a black point, get (complicated without easySelection ON, perhaps easySelection could have a keyboard shortcut) its Halo and clic on Menu > Show handles
> 4.- look for: remove all vertices but cursor and run this command once, then I get an PreDebugWindow
> 1.- create an instance of Curve (Basic categorie at Object Catalog)
> 2.- Halo > Menu > Show handles with it
> 3.- ...remove all vertices but cursor... Run this command once
> 4.- now that you have a blue circle and a orange triangle, clic on the triangle: OrderedCollection error
> or try to move the object from the blue circle: OrderedCollection error
> From Jerome Peace, 1 March 2009:
> Hi Yoshiki & crew
> Attached are some repairs for handles that prevent the errors antonio ran into. These are essentially from my polygon work for 3.9/3.10.2. They leave out the curvier repairs and just focus on the handle repairs.
> I also noticed that arrow prototypes and triangles allow for deleting vertices but then prevent anyone from adding vertices back. So when you get a polygon with just one vertex it will be forced to stay that way.
> This is not a problem for closed polygons except for triangle prototypes which aquire a special property to prevent additions. It is a problem for polygons that are open.
> So I modified addHandles to allow a triangle handle for one vertex polygons. I also modified setVertices: to remove the special property when any polygon gets down to one vertex. That seem to me less limiting that the current case.
> Looking at triangles and how simple and elegant they look with handles, it seems to be it might be nice to give the users a choice whether to have the triangle handles show or not. A second menu item perhaps
> show move handles show edit handles
> (with the check boxes in front as you do now).
> It might even be pleasant if the move handles refrained from deleting themselves if the edit handles were not present. Then triangles would stay triangles etc.
> That was too much of an enhancement to force on these repairs, but the thought has now come up :) .
> From Yoshiki, 2 March 2009:
>     Thanks, Jerome,
>     In the meantime (ah this happened again), Hayashi-san had another
> proposed fix that looks like attached. This is really the minimum fix and easier to adapt I consider, but what is your opinion?
> (From Jerome, 2 March 20090  Hi Yoshiki,
> Hayashi-san works fast! :) I have downloaded his fix and will play with it soon.
> Hayashi-san's fix seems to address other code than my fixes. Other than updateHandles (and setVertices: ) they don't seem to collide. So my general recommendation would be to combine both.
> His fix does not address the ungrowable one vertex problem which would be considered a separate bug from what antonio reported.
> Also having a factored out midPoints method gives a lot of useful options going forward. You could create a polygon from just the midPoints for example.
> The tests hasArrows and isCurvy are also frequently needed and factoring them out simplifies code and reduces bugs.
> When a curve is down to two points isCurvy recognizes that there is no reason to use the curve calculations. This benefits a little bit in terms of speed and it also helps proper placement of the midpoints.
> The code I sent you has been in use in 3.9 and 3.10.2 so I have some confidence in it being solid.
> What are Hayashi-san's thoughts?
> (antonio)  1.- Load a Curve and a Text, 2.- Curve > HaloMenu > acept drops 3.- Put the Text over the Curve (with black button) 4.- embed the Text into the Curve (Text's Halo > embed...) 5.- clic into Curve, get its Halo and clic into closed option for open it 6.- text's halo again and clic in follow owner's curve then OK, he does, BUT when I select now the Curve for erase it with upper left Halo's button I get a crash error I do not test it with Polygon object
> (without the new changesets)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

More information about the Etoys-notify mailing list