<html style="scrollbar-base-color: rgb(250, 250, 250); scrollbar-face-color: rgb(205, 212, 212); scrollbar-3dlight-color: rgb(250, 250, 250); scrollbar-shadow-color: rgb(250, 250, 250); scrollbar-highlight-color: rgb(250, 250, 250); scrollbar-darkshadow-color: rgb(250, 250, 250); scrollbar-arrow-color: rgb(250, 250, 250); scrollbar-track-color: rgb(250, 250, 250);" tabindex="-1">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta content="IE=10" http-equiv="X-UA-Compatible">
<meta name="GENERATOR" content="MSHTML 9.00.8112.16514">
<style style="display: none;" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body style="" dir="ltr" tabindex="0" aria-label="Message body" fPStyle="1">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
<p class="owaPara">That's what I thought. I was missing how to make the variable value change one the variable with created.</p>
<p class="owaPara">&nbsp;</p>
<p class="owaPara">Thanks for the help,</p>
<p class="owaPara">Rex</p>
<p class="owaPara"></p>
<div style="color: rgb(40, 40, 40);">
<hr style="width: 98%; display: inline-block;" tabindex="-1">
<div dir="ltr" id="divRplyFwdMsg"><font style="font-size: 11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> alice-teachers-bounces&#43;rmckanry=stchas.edu@lists.andrew.cmu.edu &lt;alice-teachers-bounces&#43;rmckanry=stchas.edu@lists.andrew.cmu.edu&gt; on behalf
 of Don Slater &lt;dslater@andrew.cmu.edu&gt;<br>
<b>Sent:</b> Wednesday, October 30, 2013 12:13 PM<br>
<b>To:</b> Alice educators<br>
<b>Subject:</b> Re: alice-teacher Change variable value on the fly</font>
<div>&nbsp;</div>
</div>
<div>Rex,
<div>The localProperty Boolean variable that you have declared inside of the while loop is local to the while loop, and not connected at all to the localProperty variable you declared before the while loop. This is a scoping issue of Java, not an Alice quirk.</div>
<div><br>
</div>
<div>See video at this link to which will show you how to use the assignment control tile of Alice to set the value of the original localProperty to false.&nbsp;</div>
<div><br>
</div>
<div><span style="white-space: pre;" class="Apple-tab-span"></span><a href="https://dl.dropboxusercontent.com/u/2332970/VariableScopeProblem.mp4">https://dl.dropboxusercontent.com/u/2332970/VariableScopeProblem.mp4</a></div>
<div><br>
</div>
<div>Let me know if you have another questions&#8230;</div>
<div><br>
</div>
<div>Later,</div>
<div>Don Slater<br>
<div>
<div>On Oct 30, 2013, at 10:00 AM, Rex McKanry &lt;<a href="mailto:rmckanry@stchas.edu">rmckanry@stchas.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="font:/normal Helvetica; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2;" dir="ltr" tabindex="0">
<div style="margin: 0px; font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt;" id="divtagdefaultwrapper" name="divtagdefaultwrapper">
<div style="margin-top: 0px; margin-bottom: 0px;">Hi,</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class="owaPara">&nbsp;</p>
<div style="margin-top: 0px; margin-bottom: 0px;">In Alice 3 I have created at variable at the top of the code screen. It is currently set to True and at some point in the code I would like to set it to False. It is a local variable and not a scene variable.
 I tried to make a copy of the variable and change it to False in a While loop but it does not end my loop. The code below is with a local variable but if I use a Scene variable and&nbsp;it seems to work and exit the while loop.</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class="owaPara">&nbsp;</p>
<div style="margin-top: 0px; margin-bottom: 0px;">What am I doing wrong?</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class="owaPara">&nbsp;</p>
<div style="margin-top: 0px; margin-bottom: 0px;">Thanks,</div>
<div style="margin-top: 0px; margin-bottom: 0px;">Rex McKanry</div>
<div style="margin-top: 0px; margin-bottom: 0px;">St Charles Community College</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class="owaPara">&nbsp;</p>
<p style="margin-top: 0px; margin-bottom: 0px;" class="owaPara"></p>
<span>&lt;AliceVariable.PNG&gt;</span>
<p style="margin-top: 0px; margin-bottom: 0px;" class="owaPara"></p>
<div style="margin-top: 0px; margin-bottom: 0px;"><br>
&nbsp;</div>
</div>
_______________________________________________<br>
alice-teachers mailing list<br>
<a href="mailto:alice-teachers@lists.andrew.cmu.edu">alice-teachers@lists.andrew.cmu.edu</a><br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>