Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005499 [Squeak] Morphic minor always 11-23-06 09:21 11-25-06 09:23
Reporter wiz View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.10
Summary 0005499: [Bug] Undo 'resize morph' -- does not undo correctly
Description For this one
In a fresh 7067...
Get a morph from objects (a simple rectangle will do.)
Using the grow handle make it bigger.
Using the dup handle make a duplicate in place. (the original is to serve as a control.)
Using the grow handle shrink the dup.(it will shirink and you will notice the differnce between the two rectangles.
Now from the world menu select undo 'resize rectangle'
expected you would get a rectange exactly like the first in position and size.
unexpected: what you get is a rectangle positioned differently and definitely scaled (with a rendering Transformation Morph) rather than regrown back to the original size and position.

The rendering of the 'resized' morph is even more noticable if you select an ellipse for this test.

Additional Information The undo is losing the distiction between growth and scale (as understood by morphs).



Attached Files  undoGrowFixes-sw.2.cs.gz [^] (953 bytes) 11-24-06 08:39

- Relationships

- Notes
(0008424 - 241 - 277 - 277 - 277 - 277 - 277)
wiz
11-24-06 07:40

sw 2/2/2006 02:48 HaloMorph doGrow:with: {private}

was modified and the undo method got changed (probably cut and pasted from doScale:with

startGrow:with: got the same damage done to it.

The change set that got it into 3.9 was MC40.
 
(0008425 - 264 - 312 - 312 - 312 - 312 - 312)
wiz
11-24-06 07:44

Reminder sent to: ScottWallace

Hi Scott,

This one looks like it was introduced by you.
Would you look at it an correct it in all the places that need patching?

The bug is probably also in the Squeakland updates as well.
Squeak 3.8 (6665) was ok AFAIK.

Yours in service, --Jerome Peace
 
(0008427 - 471 - 512 - 512 - 512 - 512 - 512)
ScottWallace
11-24-06 08:45

Hi, Milan, and thanks for this bug report.

 I'm uploading a *possible* fix for this bug, banged out between courses of Thanksgiving dinner. You're right that the bug also occurred in Squeakland, and that's where I produced this prospective fix.

If you have a chance to test this and let me know your findings, I'd be appreciative.... Thanks... sw

(PS: Milan, how/why did your unrelated TransformationMorph-isSticky.st fileout happen to get uploaded here?)
 
(0008428 - 375 - 453 - 453 - 520 - 520 - 520)
wiz
11-24-06 09:16

Hi Scott,

You are too fast for me.
The unrelated fix was to the next bug report 0005500.

I finished that business first then got back to here and...

Your just too swift :-)

As a reporter I don't have file deletion privileges. It probably should be removed from this report.

P.S. Its (wiz) Jerome Peace not Milan.

P.P.S. the reminder feature in mantis rocks.
 
(0008429 - 332 - 390 - 390 - 390 - 390 - 390)
ScottWallace
11-24-06 12:46

Jerome,

I deleted the TransformationMorph-isSticky.st file which had been accidentally posted here.

Very sorry to have misaddressed you! I was overfull of Thanksgiving cheer, evidently -- another reason why it would be very helpful for my suggested fix to benefit from your further gaze.

With thanks,

  -- Scott Wallace
 
(0008430 - 1042 - 1278 - 1278 - 1278 - 1278 - 1278)
wiz
11-25-06 09:23
edited on: 11-25-06 09:27

Hi Scott,
Thanks for your help.

I tried the fix ( lightly) in 3.9 and it seemed to do what was expected.

It would be good to have a test to tell the difference between the broken and the fixed state.
I usually define a new class in the test-bugs package.
Write a qnd method to demostrate the fix.
Fileout the test class.

Prove it by getting a fresh image loading the test class.
Running the method to verify it fails.
Load the fix and run the method again to verify it passes.

Template for bug method that works well is

testBuggyMethod
"self new testBuggyMethod"
"self run #testBuggyMethod"

<setup for test here>
self assert: (<whatever should be true>)
<remove junk from test>
^true

Then select and do-it one of the two comments from within a class browser.

Since this is your bug, I figure the test writing exercise is yours too.

Cheers -Jer

Also what was the reason for adding the undo cmd logic to the #doGrow: method? Was there a bug with it just being done once at the #startGrow: time?

 

- Issue History
Date Modified Username Field Change
11-23-06 09:21 wiz New Issue
11-24-06 07:40 wiz Note Added: 0008424
11-24-06 07:44 wiz Issue Monitored: ScottWallace
11-24-06 07:44 wiz Note Added: 0008425
11-24-06 08:24 wiz File Added: TransformationMorph-isSticky.st
11-24-06 08:39 ScottWallace File Added: undoGrowFixes-sw.2.cs.gz
11-24-06 08:45 ScottWallace Note Added: 0008427
11-24-06 09:16 wiz Note Added: 0008428
11-24-06 12:40 ScottWallace File Deleted: TransformationMorph-isSticky.st
11-24-06 12:46 ScottWallace Note Added: 0008429
11-25-06 09:23 wiz Note Added: 0008430
11-25-06 09:27 wiz Note Edited: 0008430


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
64 total queries executed.
38 unique queries executed.
Powered by Mantis Bugtracker