There is a possibility of duplicates.  For example, if I go to Starbucks buy a coffee, then buy a second cup.  There would be two transactions same amount, same day.
<br/><br/>What about OrderedCollection?
<br/><br/>How do I send #asSet to the bag, give that the bag is an instance variable in my larger object?
<br/><br/><br/><br/><br/><div class='shrinkable-quote'><br/>&gt; On Apr 20, 2016, at 2:43 PM, cbc [via Smalltalk] &lt;<a href="/user/SendEmail.jtp?type=node&node=4891076&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<br/>&gt; 
<br/>&gt; HI Joe,
<br/>&gt; A Bag is a structure to hold multiple, possibly repeating, objects in it. &nbsp;One of the benefits is to know how many times an object is inside of the bag - how many times it repeats.
<br/>&gt; 
<br/>&gt; Bag is implemented with a Dictionary it in - the key is the objects that you put into the bag, and the value is the count of how many times it was put into the bag (hence all of the 1's that you see - they were probably just added once to the bag).
<br/>&gt; 
<br/>&gt; The explorer is optimized to make Dictionary navigation fast and convenient for normal Dictionaries - you can see and select the key, and get to see the details of the values in the dictionary.
<br/>&gt; It is not optimized for looking at the dictionary in the Bag, where you care about the key (and mostly not about the value - at least for your use case).
<br/>&gt; 
<br/>&gt; To explore the values in the Bag, I would suggest one of two ways of getting at the data:
<br/>&gt; 1&gt; send #asSet to the bag, and explore that
<br/>&gt; 2&gt; send #keys to the dictionary, and explore that
<br/>&gt; Either should work.
<br/>&gt; 
<br/>&gt; One more thing to think about - if you aren't going to have multiples of your Transaction objects (or don't care to know that you have multiple of them) in your Bag, you might want to consider using a Set instead.
<br/>&gt; 
<br/>&gt; Thanks,
<br/>&gt; cbc
<br/>&gt; 
<br/>&gt; On Wed, Apr 20, 2016 at 12:31 PM, Joseph Alotta &lt;[hidden email]&gt; wrote:
<br/>&gt; Help!
<br/>&gt; 
<br/>&gt; 
<br/>&gt; I have a data structure as the screenshot below shows.
<br/>&gt; 
<br/>&gt; There is a Bag with Transaction objects.
<br/>&gt; 
<br/>&gt; I can’t see inside the Transaction objects?
<br/>&gt; 
<br/>&gt; Why is there a Dictionary?
<br/>&gt; 
<br/>&gt; I can see the beginning of the transaction data, but I can’t the the whole line?
<br/>&gt; 
<br/>&gt; When I explore, it opens a window on Integer 1. &nbsp;Where are all the 1s coming from?
<br/>&gt; 
<br/>&gt; 
<br/>&gt; Sincerely,
<br/>&gt; 
<br/>&gt; Joe.
<br/>&gt; 
<br/>&gt; 
<br/>&gt; here is the link: <a href="https://www.flickr.com/photos/jalotta/26480315621/" target="_top" rel="nofollow" link="external">https://www.flickr.com/photos/jalotta/26480315621/</a><br/>&gt; 
<br/>&gt; 
<br/>&gt; 
<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; _______________________________________________ 
<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/Help-can-t-see-inside-a-Bag-tp4891049p4891054.html" target="_top" rel="nofollow" link="external">http://forum.world.st/Help-can-t-see-inside-a-Bag-tp4891049p4891054.html</a><br/>&gt; To start a new topic under Squeak - Beginners, email <a href="/user/SendEmail.jtp?type=node&node=4891076&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/Help-can-t-see-inside-a-Bag-tp4891049p4891076.html">Re: Help! can't see inside a Bag</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/>