What is the group's recommendation for creating a sequential Dictionary?
i.e. A Dictionary who's associations are ordered.

Is there any precedent for this? Or does it sound like I'm barking up the
wrong tree?

In my model, I've subclassed Dictionary into QuantityDictionary to store
line items, where the key is the item and the value is the quantity of the
item. It validates that the value is always a numeric, removes the
association when the value goes below zero, and other stuff specific to my
application.

Now I'm finding it makes sense to be able to order these associations.
Imagine a recipe ingredient list, where you add and edit quantities of
ingredients, and you want to put the ingredients that you use earliest in
the recipe at the top of the ingredient list.

Before I put any more work into it, I just wanted to make sure that a
sequential dictionary makes sense, and get your ideas on how to generally go
about implementing that?

Thanks.
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to