SYSTEM WARNING: Creating default object from empty value

Mantis - Squeak
Viewing Issue Advanced Details
6897 Morphic minor always 02-11-08 23:23 05-26-08 18:39
wiz  
KenCausey  
normal  
closed  
fixed  
none    
none 3.10  
0006897: Retargeting an UpdatingMenuItem needs to consider the wording provider.


For this in a fresh squeak 3.9 (7067)

get a RectangleMorph from objects.

Using halos open it red menu and make it stay up.

Next halo around one of the toggle box items (I used round corners item)
Duplicate it (a one item menu is formed. I.E. you now have a button.

Press the item on the full stay up menu. (notice that the item box toggles as do the corners on the rectangle.)

Press the single item button. (Notice that the item box toggles but the button has no effect on the original rectangle. That is because of the problem mentioned in 0001835 and is not a subject of this report.)

Now put halos around the single item button and select
set target ( cursor turns into a target sighter)

put the cursor over the Rectangle and select it as the target.

Now push the button again. (Notice that the rectangle corners toggle between rounded and not but the item box does not change. That is the focus of this report.)
What has happened is that in copying the button the target for the button was also copied. The copy will not be in the world. It will be invisible.

So the copied button does not have the appropriate target.

When it is given the appropriate target only the target ivar is changed the wordingProvider is left alone.

Now its is obvious that coping an updating button should retain references to its appropriate targets. That is what 0001835 is dealling with.

Still there are times when you would want to change the target anyway and when that happens the wording selector would need to be affected too.

My proposed fix is partial. I do not know how to handle the case where the target and the wordingSelector start out different. But when they are the same then a target change should change the wording selector as well.

The check is done by giving the updatingmenuMorph a target: method that does the checking and the updating.

related to 0001835new  [Bug] Duplicating an UpdatingMenuMorph loses its target. 
related to 0007035closed edgardec Fix system version for 3.10.1 
child of 0006530new  A mother for button, slider and menuItem targeting and argumenting related reports. 
 UpdatingMenuItemMorph-target.st [^] (378 bytes) 02-11-08 23:23

Notes
(0012111)
KenCausey   
05-18-08 19:22   
The attached fix was added to the update stream as update 0007162 intended for release with 3.10.1.
(0012181)
KenCausey   
05-26-08 18:39   
Fixed in 3.10.1