<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On Oct 13, 2020, at 7:30 AM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">



<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Personally, I neither need nor dislike such a preference, but actually, I turned <span>mustDeclareVariables off a small number of times for a single workspace in past. The reason was that if you use a workspace to prepare some "production" code, it beguiles
 you into missing some variable declarations, in particular inside of blocks, making you overlooking any unintended closure/process interconnections that do not work in actual production. I often fill a workspace with several snippets that I plan to compile
 into different methods. The workspace bindings add a global namespace between these snippets that does not always exist when compiling the methods at different places.</span></p>
<p><span><br>
</span></p>
<p><span>Also, one might consider it as inconvenient that every mistyped doit creates a new binding but you cannot remove this binding again without opening the window menu which interrupts the usual scripting workflow ...</span></p>
<p><span><br>
</span></p>
<p><span>However, I don't see the harm of such a preference, and I welcome adding a reasonable number of preferences whenever this can help anyone of the community to make Squeak even more convenient for yourself. We don't need to integrate every preference
 into the wizard, though :-)</span></p></div></div></blockquote><div><br></div>+3 :-).<div><br><blockquote type="cite"><div dir="ltr"><div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span>Best,</span></p>
<p>Christoph</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> Dienstag, 13. Oktober 2020 15:22:48<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: Tools-eem.999.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Huh? Why should anybody want to turn this off? It should always be possible to evaluate "x := 5" and then use "x" in a Workspace. It would be really cumbersome if one always had to evaluate the entire workspace and also write those || declarations on the top.
 Please ... :-(
<div><br>
</div>
<div>Please elaborate. Why does this feature hinders your working habits? You can always evaluate the entire workspace. This just seems like a preference that would annoy people if not set correctly. Why do you want to prevent "x := 5" evaluation. I don't understand.
 Why can that be dangerous?</div>
<div><br>
</div>
<div>-1 for such a preference. But I could live with it. ;-)<br>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
</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;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 12.10.2020 20:00:28 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
http://source.squeak.org/trunk/Tools-eem.999.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-eem.999<br>
Author: eem<br>
Time: 12 October 2020, 11:00:17.202907 am<br>
UUID: 53fd9116-3cf5-43db-ad0d-150e7f41efd3<br>
Ancestors: Tools-mt.998<br>
<br>
Add a preference for automatic variable declaration in a Workspace (true by default). Many people love this feature; I hate it :-)<br>
<br>
=============== Diff against Tools-mt.998 ===============<br>
<br>
Item was changed:<br>
StringHolder subclass: #Workspace<br>
instanceVariableNames: 'bindings acceptDroppedMorphs acceptAction mustDeclareVariables shouldStyle environment'<br>
+ classVariableNames: 'DeclareVariablesAutomatically LookupPools ShouldStyle'<br>
- classVariableNames: 'LookupPools ShouldStyle'<br>
poolDictionaries: ''<br>
category: 'Tools-Base'!<br>
<br>
!Workspace commentStamp: 'fbs 6/2/2012 20:46' prior: 0!<br>
A Workspace is a text area plus a lot of support for executable code. It is a great place to execute top-level commands to compute something useful, and it is a great place to develop bits of a program before those bits get put into class methods.<br>
<br>
To open a new workspace, execute:<br>
<br>
Workspace open<br>
<br>
<br>
A workspace can have its own variables, called "workspace variables", to hold intermediate results. For example, if you type into a workspace "x := 5" and do-it, then later you could type in "y := x * 2" and y would become 10.<br>
<br>
Additionally, in Morphic, a workspace can gain access to morphs that are on the screen. If acceptDroppedMorphs is turned on, then whenever a morph is dropped on the workspace, a variable will be created which references that morph. This functionality is toggled
 with the window-wide menu of a workspace.<br>
<br>
<br>
The instance variables of this class are:<br>
<br>
bindings - holds the workspace variables for this workspace<br>
<br>
acceptDroppedMorphs - whether dropped morphs should create new variables!<br>
<br>
Item was added:<br>
+ ----- Method: Workspace class>>declareVariablesAutomatically (in category 'preferences') -----<br>
+ declareVariablesAutomatically<br>
+ <preference: ?automatically="" declare="" variablesinworkspaces?=""></preference:><br>
+ category: 'browsing' <br>
+ description: 'If true, workspaces automatically create variables.' <br>
+ type: #Boolean><br>
+ ^DeclareVariablesAutomatically ifNil: [true]!<br>
<br>
Item was added:<br>
+ ----- Method: Workspace class>>declareVariablesAutomatically: (in category 'preferences') -----<br>
+ declareVariablesAutomatically: aBoolean<br>
+ DeclareVariablesAutomatically := aBoolean!<br>
<br>
Item was changed:<br>
----- Method: Workspace>>initialize (in category 'initialize-release') -----<br>
initialize<br>
<br>
super initialize.<br>
self initializeBindings.<br>
acceptDroppedMorphs := false.<br>
+ mustDeclareVariables := self class declareVariablesAutomatically not.<br>
+ environment := Environment current!<br>
- mustDeclareVariables := false.<br>
- environment := Environment current.!<br>
<br>
Item was changed:<br>
----- Method: Workspace>>mustDeclareVariableWording (in category 'variable declarations') -----<br>
mustDeclareVariableWording<br>
<br>
+ ^(mustDeclareVariables<br>
+ ifFalse: ['<yes> automatically create variable declaration']<br>
+ ifTrue: ['<no> automatically create variable declaration']) translated!<br>
- ^ mustDeclareVariables not<br>
- ifTrue: ['<yes> automatically create variable declaration' translated]<br>
- ifFalse: ['<no> automatically create variable declaration' translated]!<br>
<br>
<br>
</no></yes></no></yes></div>
</blockquote>
</div>
</div>


<span></span><br></div></blockquote></div></body></html>