<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>I have found myself never being happy with a generated name - just because a computer cannot not know the semantics and the role I would like to give the just-dropped object. The first thing I do after dropping a variable is assigning it to another variable
 by hand, so for me, such a prompt would be really helpful. What about a preference for this particular behavior? :-)</p>
<p><br>
</p>
<p>> <span style="font-size: 12pt;">What about using String >> #findFeatures and a serial number that starts at 1 for each new workspace?</span></p>
<div><br>
</div>
<div>As a proposed value - interesting! But don't we want to support #externalName here?</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 23. März 2020 10:54:33<br>
<b>An:</b> gettimothy via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Tools-ct.962.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi Christoph.
<div><br>
</div>
<div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">- Ask for a useful variable name when dropping something into a workspace</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Note that adding a disruptive prompt for the user is a substantial change to existing workflows. It would be better if one could come up with a better variable name automatically instead
 of prompting the user.</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">What about using String >> #findFeatures and a serial number that starts at 1 for each new workspace?</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"> a BorderedMorph(3550942) -> #(bordered morph) -> morph1</span></span><br>
</div>
<div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br>
</span></span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Best,</span></span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Marcel</span></span></div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 20.03.2020 18:58:29 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">Christoph Thiede uploaded a new version of Tools to project The Inbox:<br>
http://source.squeak.org/inbox/Tools-ct.962.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-ct.962<br>
Author: ct<br>
Time: 20 March 2020, 6:58:18.856237 pm<br>
UUID: c4cbd7b0-ddf5-3b4b-93ed-55e5b2c80465<br>
Ancestors: Tools-mt.955<br>
<br>
Makes variable bindings in Workspace more comfortable:<br>
<br>
- Ask for a useful variable name when dropping something into a workspace<br>
- Validate variable name before creating inaccessible bindings<br>
- Do not propose invalid names at all (for example, dropped class were given an invalid name in the past)<br>
- Ask before removing variable bindings. This also increases responsiveness of the UI.<br>
- Improves multilingual support<br>
<br>
=============== Diff against Tools-mt.955 ===============<br>
<br>
Item was changed:<br>
----- Method: Workspace>>acceptDroppingMorph:event:inMorph: (in category 'drag and drop') -----<br>
acceptDroppingMorph: dropee event: evt inMorph: targetMorph <br>
+ "Return the dropee to its old position, and add a reference to it at the cursor point."<br>
+ <br>
- "Return the dropee to its old position, and add a reference to it at the<br>
- cursor point."<br>
| bindingName externalName reference |<br>
(dropee isKindOf: TransferMorph)<br>
ifTrue: [reference := dropee passenger.<br>
externalName := dropee passenger className]<br>
ifFalse: [reference := dropee.<br>
externalName := dropee externalName].<br>
externalName := externalName isOctetString<br>
+ ifTrue: [externalName]<br>
+ ifFalse: ['a' , externalName].<br>
+ <br>
+ bindingName := Project uiManager<br>
+ request: 'Please enter a name for the dropped object:' translated<br>
+ initialAnswer: (externalName withFirstCharacterDownshifted , reference identityHash printString) asLegalSelector.<br>
+ bindingName isEmptyOrNil ifTrue: [^ false].<br>
+ bindingName := Parser new parseSelector: bindingName.<br>
+ bindingName ifNil: [<br>
+ self inform: 'Invalid selector.' translated.<br>
+ ^ false].<br>
+ <br>
- ifTrue: [externalName]<br>
- ifFalse: ['a' , externalName].<br>
- bindingName := externalName withFirstCharacterDownshifted , reference identityHash printString.<br>
- targetMorph correctSelectionWithString: bindingName , ' '.<br>
(self bindingOf: bindingName)<br>
value: reference.<br>
+ targetMorph correctSelectionWithString: bindingName , ' '.<br>
(dropee isKindOf: TransferMorph)<br>
ifFalse: [dropee rejectDropMorphEvent: evt].<br>
+ ^ true "success"!<br>
- ^ true"success"!<br>
<br>
Item was changed:<br>
----- Method: Workspace>>addModelItemsToWindowMenu: (in category 'menu commands') -----<br>
addModelItemsToWindowMenu: aMenu <br>
<br>
aMenu addLine.<br>
aMenu<br>
+ add: 'save contents to file...' translated<br>
- add: 'save contents to file...'<br>
target: self<br>
action: #saveContentsInFile.<br>
aMenu<br>
+ add: 'inspect variables' translated<br>
- add: 'inspect variables'<br>
target: self<br>
action: #inspectBindings.<br>
aMenu<br>
+ add: 'reset variables' translated<br>
- add: 'reset variables'<br>
target: self<br>
+ action: #resetBindings.<br>
- action: #initializeBindings.<br>
aMenu<br>
addUpdating: #mustDeclareVariableWording<br>
target: self<br>
action: #toggleVariableDeclarationMode.<br>
aMenu<br>
addUpdating: #acceptDroppedMorphsWording<br>
target: self<br>
action: #toggleDroppingMorphForReference.<br>
<br>
+ self addToggleStylingMenuItemTo: aMenu.!<br>
- self addToggleStylingMenuItemTo: aMenu.<br>
- !<br>
<br>
Item was added:<br>
+ ----- Method: Workspace>>resetBindings (in category 'menu commands') -----<br>
+ resetBindings<br>
+ <br>
+ (self bindings notEmpty ==> [self confirm: ('Are you sure you would like to remove {1} variables?' translated format: {self bindings size})])<br>
+ ifFalse: [^ self].<br>
+ self initializeBindings.!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>