Ben, Ron, I made a small example, and it works as you said it would:
<br/><br/>a := #( #(1 2) &nbsp;#(3 4)).
<br/>b := a asOrderedCollection.
<br/>b &nbsp;=&gt; an OrderedCollection(#(1 2) #(3 4))
<br/>c := b select: [ :i | (i first) = 3 ].
<br/>c =&gt; an OrderedCollection(#(3 4))
<br/>d := c first
<br/>d =&gt; &nbsp;#(3 4)
<br/>d at: 2 put: 5
<br/>d =&gt; &nbsp;#(3 5)
<br/>b &nbsp;=&gt; an OrderedCollection(#(1 2) #(3 5))
<br/><br/>Okay, I will check my other code.
<br/><br/>Sincerely,
<br/><br/>Joe.
<br/><br/><br/><br/><div class='shrinkable-quote'><br/>&gt; On Jul 26, 2016, at 6:25 PM, Ben Coman [via Smalltalk] &lt;<a href="/user/SendEmail.jtp?type=node&node=4908114&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<br/>&gt; 
<br/>&gt; Hi Joe, 
<br/>&gt; 
<br/>&gt; As Ron said, you should not be getting a copy. &nbsp;If you still have a 
<br/>&gt; problem, perhaps best if you post code for a complete example: 
<br/>&gt; * class definition (with just two instance variables) 
<br/>&gt; * instance variable accessor methods 
<br/>&gt; * instance creation &amp; adding to collection 
<br/>&gt; * select statement 
<br/>&gt; * updating object 
<br/>&gt; 
<br/>&gt; cheers -ben 
<br/>&gt; 
<br/>&gt; On Wed, Jul 27, 2016 at 5:53 AM, Ron Teitelbaum &lt;[hidden email]&gt; wrote:
<br/>&gt; 
<br/>&gt; &gt; Hi Joe, 
<br/>&gt; &gt; 
<br/>&gt; &gt; If the orderedCollection contains your object DrivingDays then select should give you the object and not a copy. 
<br/>&gt; &gt; 
<br/>&gt; &gt; You don't need to add it back to the collection just update the object. 
<br/>&gt; &gt; 
<br/>&gt; &gt; Check your code for anything that might be making a copy. 
<br/>&gt; &gt; 
<br/>&gt; &gt; All the best, 
<br/>&gt; &gt; 
<br/>&gt; &gt; Ron Teitelbaum 
<br/>&gt; &gt; 
<br/>&gt; &gt; 
<br/>&gt; &gt; -----Original Message----- 
<br/>&gt; &gt; From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Alotta 
<br/>&gt; &gt; Sent: Tuesday, July 26, 2016 3:04 PM 
<br/>&gt; &gt; To: [hidden email] 
<br/>&gt; &gt; Subject: [Newbies] indexing into a collection 
<br/>&gt; &gt; 
<br/>&gt; &gt; Greetings, 
<br/>&gt; &gt; 
<br/>&gt; &gt; I have a OrderedCollection of DrivingDays. 
<br/>&gt; &gt; 
<br/>&gt; &gt; 
<br/>&gt; &gt; an OrderedCollection(2016-01-02| quigley s| nil|18§ 
<br/>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2016-01-03| marianos fresh| nil|5§ 
<br/>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2016-01-04| fresh thyme| nil|5§ 
<br/>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2016-01-05| panda express| nil|3§ 
<br/>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2016-01-06| peets| nil|7§ 
<br/>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2016-01-07| starbucks| nil|3§) 
<br/>&gt; &gt; 
<br/>&gt; &gt; I want to select aDrivingDay object from the list by date, update it by adding mileage and places visited and put it back into the list. 
<br/>&gt; &gt; 
<br/>&gt; &gt; If I #select the OrderedCollection, I get a copy of the item, not the same one in the OrderedCollection. 
<br/>&gt; &gt; 
<br/>&gt; &gt; How do I select an item in the list for update? 
<br/>&gt; &gt; 
<br/>&gt; &gt; Sincerely, 
<br/>&gt; &gt; 
<br/>&gt; &gt; Joe.
<br/>&gt; _______________________________________________ 
<br/>&gt; Beginners mailing list 
<br/>&gt; [hidden email] 
<br/>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>&gt; 
<br/>&gt; 
<br/>&gt; If you reply to this email, your message will be added to the discussion below:
<br/>&gt; <a href="http://forum.world.st/indexing-into-a-collection-tp4908090p4908113.html" target="_top" rel="nofollow" link="external">http://forum.world.st/indexing-into-a-collection-tp4908090p4908113.html</a><br/>&gt; To start a new topic under Squeak - Beginners, email <a href="/user/SendEmail.jtp?type=node&node=4908114&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> 
<br/>&gt; To unsubscribe from Squeak - Beginners, click here.
<br/>&gt; NAML
</div><br/>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/indexing-into-a-collection-tp4908090p4908114.html">Re: indexing into a collection</a><br/>
Sent from the <a href="http://forum.world.st/Squeak-Beginners-f107673.html">Squeak - Beginners mailing list archive</a> at Nabble.com.<br/>