|Anonymous | Login||12-08-2019 01:06 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0007181||[Squeak] Morphic||minor||always||09-10-08 22:27||10-03-09 19:33|
|Reporter||Pascal Vollmer||View Status||public|
|Summary||0007181: improve HandMorph>>shadowForm|
Say you want to know which is the color of the morph under the mouse pointer. Also say that the mouse pointer has no morphs attached to it.
You might use touchesColor: in order to do this.
When sending touchesColor: to a HandMorph-object you will send shadowForm to this HandMorph-object.
If at this moment the mouse pointer has no submorphs shadowForm will fail.
The remedy in this case is to send shadowForm to super."
HandMorph-shadowForm-M7181-pv.1.cs.gz [^] (636 bytes) 09-10-08 22:30
HandMorphTest-M7181-pv.1.cs.gz [^] (492 bytes) 09-22-08 20:22
(0012628 - 72 - 84 - 84 - 84 - 84 - 84)
edited on: 09-10-08 22:32
Added a fix. (Thanks to Ken Causey for his video how to report bugs !)
(0012649 - 425 - 479 - 479 - 479 - 479 - 479)
Thanks for the fix.
It would be good if you could also include an Sunit test. One which fails before the fix is installed and passes afterwards.
This will build confidence in the fix. It will also stop someone from removing the fix w/o noticing that they have done so.
I have been asking this of all submitters so as to make life easier on harvesters.
Yours in curiosity and service, --Jerome Peace
(0012652 - 887 - 977 - 977 - 977 - 977 - 977)
Without the patch ActiveHand shadowForm raises an error and with the patch it does not. So that could be the basis for a test.
I did take a look at the patch. It is an improvement of the current state of affairs.
I am not sure how it handles the case when the cursor is blank and there are also no submorphs. But that would be a bug in its own right. I have known it to happen. A handle is used as a submorph. The cursor is set to
blank and something causes the handle to be removed.
So I am wondering if instead of calling super a onebit shadowForm with an offset equal to the cursor position would not be a good alternative?
That is as far as I have gotten in my thinking.
If you have time to spend on this I would suggest making the tests first then fiddling (iff you wish) with the code itself. Your current patch is still an improvement.
(0012681 - 164 - 176 - 176 - 176 - 176 - 176)
I've added a unit test as you requested. It tests touchesColor: with and w/o the fix and shows that the fix is useful for this use case.
(0012715 - 175 - 229 - 229 - 229 - 229 - 229)
Installer mantis bug: 7181 fix: 'HandMorph-shadowForm-M7181-pv.1.cs.gz'.
Installer mantis bug: 7181 fix: 'HandMorphTest-M7181-pv.1.cs.gz'.
|09-10-08 22:27||Pascal Vollmer||New Issue|
|09-10-08 22:30||Pascal Vollmer||File Added: HandMorph-shadowForm-M7181-pv.1.cs.gz|
|09-10-08 22:31||Pascal Vollmer||Note Added: 0012628|
|09-10-08 22:32||Pascal Vollmer||Note Edited: 0012628|
|09-12-08 22:47||wiz||Note Added: 0012649|
|09-12-08 23:56||wiz||Note Added: 0012652|
|09-22-08 20:22||Pascal Vollmer||File Added: HandMorphTest-M7181-pv.1.cs.gz|
|09-22-08 20:26||Pascal Vollmer||Note Added: 0012681|
|10-01-08 02:24||Keith_Hodges||Note Added: 0012715|
|10-01-08 02:26||Keith_Hodges||Relationship added||child of 0006635|
|01-10-09 02:13||Keith_Hodges||Status||new => pending|
|01-10-09 03:21||Keith_Hodges||Status||pending => testing|
|01-10-09 03:40||Keith_Hodges||Status||testing => resolved|
|01-10-09 03:40||Keith_Hodges||Fixed in Version||=> 3.11|
|01-10-09 03:40||Keith_Hodges||Resolution||open => fixed|
|01-10-09 03:40||Keith_Hodges||Assigned To||=> Keith_Hodges|
|01-10-09 03:41||Keith_Hodges||Status||resolved => testing|
|10-03-09 19:33||Keith_Hodges||Status||testing => assigned|
|10-03-09 19:33||Keith_Hodges||Assigned To||Keith_Hodges => andreas|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
71 total queries executed.|
43 unique queries executed.