Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005389 [Squeak] Morphic minor always 11-09-06 05:01 08-22-07 03:18
Reporter wiz View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.10
Summary 0005389: For sliders and buttons, you can set the number of arguments via menu but you can not clear them
Description For this one

Get a slider
from the red menu.
Add a one argument actionselector ( e.g. #height:)
sight a target e.g. and ellipse)
set appropriate min and max values ( e.g. 0.0 .. 500.0 )
use the slider (height of the ellipse should grow and shrink)

Now set Arguments and type in a number (e.g. 42.0 )

Use the slider ( Debug boxes appear because you have the wrong # of arguments. )
If necessary use cmd-dot to stop the debug messages.

Now try to repair the mistake.
Go to set arguments and erase the number you had written.
Use the slider.
Note the previous debug boxes still appear.

You can not use setArguments to clear all arguments (except the sliders which you want.)




Additional Information This bug has been hidden by the fact that simple buttons and sliders have been useless. (There has been no way to set the target)

Having fixed that I've run into the hidden bugs.
There are for classes that use #setArgument.

'ButtonProperties setActionSelector {menu}'
'SimpleButtonMorph setActionSelector {menu}'
'SimpleSliderMorph setActionSelector {menu}'
'StringButtonMorph setActionSelector {menu}'

so each will need a #clearArguments message and a modification to the menu items.

It probably follows that #setActionSelector needs a #clearActionSelector as well.

Finally I am getting the impression from the number of times I have had to fix slider/button bugs in several places that some thought ma y want to go into refactoring this stuff so it needs only be programmed in one place.

Yours in service, --Jerome Peace

Attached Files  buttonArgsFix.1.cs.gz [^] (723 bytes) 05-21-07 18:03
 buttonClearFix.1.cs.gz [^] (308 bytes) 05-22-07 03:46

- Relationships

SYSTEM WARNING: Creating default object from empty value

child of 0006635new  Mother of Squeak UI annoyances 
child of 0006530new  A mother for button, slider and menuItem targeting and argumenting related reports. 

- Notes
(0010734 - 218 - 218 - 218 - 218 - 218 - 218)
kks
05-21-07 18:00

I added clearAction method and menu items for ButtonProperties, SimpleButtonMorph, SimpleSliderMorph and StringButtonMorph. I am now able to clear selectors and arguments in one shot from the menu. Change set enclosed.
 
(0010737 - 224 - 260 - 260 - 260 - 260 - 260)
wiz
05-21-07 18:54

Hi Subbu

Thanks for your help. I've downloaded you fixes and will take a look at them in the next few days.

Thanks for your keen eyes and interest in improving squeak.

Yours in curiosity and service, --Jerome Peace
 
(0010740 - 627 - 737 - 737 - 737 - 737 - 737)
wiz
05-22-07 02:13

Feedback.

I tried both changesets.

The second which adds "clear action" runs into a problem.
To see the problem

In a fresh sq7105
from a filelist install  buttonArgsFix.1.cs.gz

from objects get a press me button.
from red menu select the clear action menu item.
then select change action selector.
(Error: Instances of UndefinedObject are not indexable) notification comes up.

The item should probably be limited to "clear arguments" leaving an action selector or alternately use a default action selector (which by tradition has been #flash. My design choice would be to for the simplicity of the former.
 
(0010741 - 560 - 620 - 620 - 620 - 620 - 620)
wiz
05-22-07 02:28

I tried SimpleButtonMorph.kks.1.cs .

And it worked in a limited fashion. It was aimed at just one of the four classes that need it. More over it represents a change in what users are expecting. So it requires a way to retrain old users and to train new users.

So I tend to favor a simple menu item.

----

Now that I've got the criticism out of my system I also want to say that it is not bad innitial attempt. And thanks for waking this report up. It is much harder to put a priority on something until at least one other person is interested.

.
 
(0010742 - 207 - 231 - 231 - 231 - 231 - 231)
kks
05-22-07 03:46

wiz,

Thank you very much for catching the slip. Uploading 2.cs where clear resets selector to #flash.

BTW, ignore the SimpleButton changeset. I uploaded it by mistake. I have requested for its removal.
 
(0010746 - 408 - 456 - 456 - 456 - 456 - 456)
wiz
05-23-07 04:25

Hi Subbu,

I will check the new changeset.

We need also to write an sunit test to go along with the changes.

On reflection I like your design choice. Changing the number of arguments will require an action that takes no arguments. Which will generally not be the case. My preference would have required users to explicitly change the action. Your choice is better.

Thanks for your contribution.
 

- Issue History
Date Modified Username Field Change
11-09-06 05:01 wiz New Issue
05-21-07 11:11 kks File Added: SimpleButtonMorph.kks.1.cs
05-21-07 12:28 kks Note Added: 0010733
05-21-07 18:00 kks Note Added: 0010734
05-21-07 18:02 kks Note Deleted: 0010733
05-21-07 18:03 kks File Added: buttonArgsFix.1.cs.gz
05-21-07 18:14 kks Issue Monitored: kks
05-21-07 18:54 wiz Note Added: 0010737
05-22-07 02:13 wiz Note Added: 0010740
05-22-07 02:28 wiz Note Added: 0010741
05-22-07 03:46 kks Note Added: 0010742
05-22-07 03:46 kks File Added: buttonClearFix.1.cs.gz
05-22-07 13:47 KenCausey File Deleted: SimpleButtonMorph.kks.1.cs
05-23-07 04:25 wiz Note Added: 0010746
08-11-07 23:10 matthewf Issue Monitored: matthewf
08-22-07 03:18 matthewf Relationship added child of 0006635
08-22-07 03:18 matthewf Issue End Monitor: matthewf
08-22-07 05:05 matthewf Relationship added child of 0006530


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