[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-beginners
Subject:    Re: [Newbies] Code not working
From:       Igor Raven <igorraven1 () gmail ! com>
Date:       2023-03-05 4:50:01
Message-ID: CAN0Ejx4o8ba9037gtq8jcFhXxKjVOgCyXyw4dCd2d3V4CH+AHQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/related)]

[Attachment #4 (multipart/alternative)]


Thank you for the response.

As you can see from the screenshot

a and i

have values displayed in blue. They have been initialized.
The portion highlighted is to get (sum) value to print.


I did get it to work but only after closing this instance of the code and
re-initializing in a new window.

The code looks same to me but in the new instance it worked.

There must've been something in the memory cash they got corrupted or it
was just a small gremlin having its way with me.

On Sat, Mar 4, 2023 at 6:30 PM MARK MILLER <mmille10@comcast.net> wrote:

> I don't know if you've solved this already, but what I notice in your
> screenshot is you only have the loop code highlighted.
>
> I tried reproducing what you're talking about, and the closest I got was
> when I initialized (evaluated) i and sum, but not a. So, include all the
> locals in what you highlight, before getting to the loop.
>
> If you don't evaluate the initialization of the locals, the workspace
> doesn't know they exist.
>
> ---Mark mmille10@comcast.net
>
> On 03/04/2023 4:09 PM Igor Raven <igorraven1@gmail.com> wrote:
>
>
> This code segment works for the presenter, Huw, at
> https://youtu.be/8ibI5bfssCU?list=PLZHx5heVfgEvuveKG1T7BBSuDOTHl1eLl&t=1481
>
>
> but it fails for me.
>
> The Screen grab shows my code and error on left and working code on right.
>
> What am I missing? Please be gentle ;-)
> [image: image.png]
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> Beginners@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

[Attachment #7 (text/html)]

<div dir="ltr">


	
	<span></span>
	
	


<p style="margin-bottom:0in">Thank you for the response.</p>
<p style="margin-bottom:0in">As you can see from the screenshot 
</p>
<p style="margin-bottom:0in">a and i</p>
<p style="margin-bottom:0in">have values displayed in blue. They
have been initialized.<br>The portion highlighted is to get (sum)
value to print.</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">I did get it to work but only after
closing this instance of the code and re-initializing in a new
window.</p>
<p style="margin-bottom:0in">The code looks same to me but in the
new instance it worked.</p>
<p style="margin-bottom:0in">There must&#39;ve been something in the
memory cash they got corrupted or it was just a small gremlin having
its way with me.</p>

</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 4, \
2023 at 6:30 PM MARK MILLER &lt;<a \
href="mailto:mmille10@comcast.net">mmille10@comcast.net</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
   
 
 <div> 
  <div style="font-size:12pt;font-family:helvetica,arial,sans-serif;color:rgb(51,51,51)">
  I don&#39;t know if you&#39;ve solved this already, but what I notice in your \
screenshot is you only have the loop code highlighted.   </div> 
  <div style="font-size:12pt;font-family:helvetica,arial,sans-serif;color:rgb(51,51,51)"> \
  <br> 
  </div> 
  <div style="font-size:12pt;font-family:helvetica,arial,sans-serif;color:rgb(51,51,51)">
  I tried reproducing what you&#39;re talking about, and the closest I got was when I \
initialized (evaluated) i and sum, but not a. So, include all the locals in what you \
highlight, before getting to the loop.   </div> 
  <div style="font-size:12pt;font-family:helvetica,arial,sans-serif;color:rgb(51,51,51)"> \
  <br> 
  </div> 
  <div style="font-size:12pt;font-family:helvetica,arial,sans-serif;color:rgb(51,51,51)">
  If you don&#39;t evaluate the initialization of the locals, the workspace \
doesn&#39;t know they exist.   </div> 
  <div> 
   <pre>---Mark 
<a href="mailto:mmille10@comcast.net" target="_blank">mmille10@comcast.net</a></pre> 
  </div> 
  <blockquote type="cite"> 
   <div>
     On 03/04/2023 4:09 PM Igor Raven &lt;<a href="mailto:igorraven1@gmail.com" \
target="_blank">igorraven1@gmail.com</a>&gt; wrote:   </div> 
   <div> 
    <br> 
   </div> 
   <div> 
    <br> 
   </div> 
   <div dir="ltr"> 
    <p style="margin-bottom:0in">This code segment works for the presenter, Huw, at \
<a href="https://youtu.be/8ibI5bfssCU?list=PLZHx5heVfgEvuveKG1T7BBSuDOTHl1eLl&amp;t=1481" \
target="_blank">https://youtu.be/8ibI5bfssCU?list=PLZHx5heVfgEvuveKG1T7BBSuDOTHl1eLl&amp;t=1481</a></p> \
  <p style="margin-bottom:0in"><br></p> 
    <p style="margin-bottom:0in">but it fails for me.</p> 
    <p style="margin-bottom:0in">The Screen grab shows my code and error on left and \
working code on right.</p>   <p style="margin-bottom:0in">What am I missing? Please \
be gentle ;-)</p>   <img alt="image.png" src="cid:186b01ad630cb971f161" width="468" \
height="442">   <br> 
    <br> 
    <p style="margin-bottom:0in"><br></p> 
   </div>_______________________________________________ 
   <br>Beginners mailing list 
   <br><a href="mailto:Beginners@lists.squeakfoundation.org" \
target="_blank">Beginners@lists.squeakfoundation.org</a>   <br><a \
href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" \
target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a>   \
<br>   </blockquote> 
 </div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" \
target="_blank">Beginners@lists.squeakfoundation.org</a><br> <a \
href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" \
target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br> \
</blockquote></div>


["image.png" (image/png)]
[Attachment #9 (text/plain)]

_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic