<br><div class="gmail_quote">2011/7/12 Ben Coman <span dir="ltr">&lt;<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>


  
  

<div bgcolor="#ffffff" text="#000000"><div><div></div><div class="h5">
Nicolas Cellier wrote:
<blockquote type="cite"><br>
  <br>
  <div class="gmail_quote">2011/7/11 <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span><br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">A
new version of Tools was added to project The Inbox:<br>
    <a href="http://source.squeak.org/inbox/Tools-btc.367.mcz" target="_blank">http://source.squeak.org/inbox/Tools-btc.367.mcz</a><br>
    <br>
==================== Summary ====================<br>
    <br>
Name: Tools-btc.367<br>
Author: btc<br>
Time: 12 July 2011, 12:07:30.194 am<br>
UUID: bdc1afda-eed5-904b-9987-572aac977a16<br>
Ancestors: Tools-bf.366<br>
    <br>
Single stepping through debugger can observe an anOrderedCollection
object in an inconsistent state after creation but before
initialisation.  This threw an error when the inspector asked for the
size of the object - now handled.<br>
    <br>
=============== Diff against Tools-bf.366 ===============<br>
    <br>
Item was changed:<br>
 ----- Method: OrderedCollectionInspector&gt;&gt;fieldList (in category
&#39;as yet unclassified&#39;) -----<br>
 fieldList<br>
       object ifNil: [ ^ OrderedCollection new].<br>
       ^ self baseFieldList ,<br>
+               (self objectSize &lt;= (self i1 + self i2)<br>
+                       ifTrue: [(1 to: self objectSize)<br>
-               (object size &lt;= (self i1 + self i2)<br>
-                       ifTrue: [(1 to: object size)<br>
                                               collect: [:i | i
printString]]<br>
+                       ifFalse: [(1 to: self i1) , (self objectSize -
(self i2-1) to: self objectSize)<br>
-                       ifFalse: [(1 to: self i1) , (object size-(self
i2-1) to: object size)<br>
                                               collect: [:i | i
printString]])<br>
 &quot;<br>
 OrderedCollection new inspect<br>
 (OrderedCollection newFrom: #(3 5 7 123)) inspect<br>
 (OrderedCollection newFrom: (1 to: 1000)) inspect<br>
 &quot;!<br>
    <br>
  </blockquote>
  <div><br>
I understand, OrderedCollection new inspect won&#39;t fail.<br>
But you can&#39;t debugIt step by step, because just after basicNew, it
will be uninitialized.<br>
  </div>
  </div>
</blockquote></div></div>
Thats right, I could not debug past the basicNew and through the
&#39;setCollection:&#39; initialization, but I expect to be able to. I was
debugging some code step-by-step, which happened to create a new
OrderCollection, which caused the debugger to produce a
DoesNotUnderstand error that I could not get past.  This can be
simulated by...   &#39;self halt. OrderedCollection new: 5.&#39;<br>
<br>
What now is the status of my two Inbox submissions?  I assume they are
rejected but it doesn&#39;t specifically say so.  <br>
Do you correct them as necessary to push them forward? Or do I resubmit
new ones taking on board the feedback from yourself and Levente?<br></div></blockquote><div><br>I suggest you resubmit, your contribution is welcomed!<br><br>Nicolas <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<blockquote type="cite"><div class="im">
  <div class="gmail_quote">
  <div> <br>
  </div>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Item
was added:<br>
+ ----- Method: OrderedCollectionInspector&gt;&gt;objectSize (in
category &#39;as yet unclassified&#39;) -----<br>
+ objectSize<br>
+       &quot;Single stepping through a debugger can observe the object
state after creation but before initiialisation.&quot;<br>
+       &quot;Thus &#39;object size&#39; may throw an axception for trying to do
arithmetic on nil.&quot;<br>
+<br>
+        [ object size ] on: Exception do: [ ^ 0 ].<br>
+        ^ object size.!<br>
  </blockquote>
  <div><br>
Is it a good idea to catch all Exception ?<br>
Otherwise, there is no reason to invoke size twice, it just could be<br>
^ [ object size ] on: Error do: [ 0 ]</div>
  </div>
  <br>
Nicolas<br>
  </div><pre><hr size="4" width="90%">

  </pre>
</blockquote>
<br>
</div>

<br><br>
<br></blockquote></div><br>