To TreeModel or not to TreeModel



Hi all,

I've been working on something for quite sometime now, but still not quite certain how to go about it.

I'm working on an app for a bookshop. The owner is selling used books, and since he is a bit of an order freak he has categorized these books in about 300 hundred different catalogs, most of which are subcatalogs at varying depth.

So I created a class catalog, which holds a collection of catalogs (nodes) and a collection of books (leafs).

So far so good.


But it turns out that I want to iterate over the catalog(s) much as I would like to iterate over a collection.

I've implemented the functionality, with recursive and non-recursive iteration, but at the end of the day I'm not sure whether to use OA's TreeModel instead or not.

What would you choose in this scenario?

Günther
.



Relevant Pages

  • Re: Any biography of George Herter?
    ... Any decent magazine ... books and catalogs, but it's not clear how consistent it would all be. ...
    (rec.guns)
  • Re: To TreeModel or not to TreeModel
    ... But in a way, this tree is also a collection, there are things that I ... But if the tree holds both books and catalogs, ... price of the catalogs in the total. ...
    (comp.lang.smalltalk.dolphin)
  • Re: Where can I find Elamite/Akkadian cuneiform syllabaries?
    ... did you try looking in the on-line catalogs of big libraries? ... so I would have come across any English language books in online ... catalogs accesible via the Internet. ... other languages yet - a book in English would be a lot easier for me ...
    (sci.lang)
  • Re: Ancient mysteries?
    ... >> regularly spent my gift money there, but there was some sort of ... >> four books free somehow. ... >have had different catalogues, being in different grades. ... catalogs, (since I seem to remember the catalogs covering several ...
    (rec.arts.mystery)
  • Re: Tetration again!
    ... tetration, which he calls T, because the function to iterate, ... the other is a nicely edited one by bruce berndt ... separated into 5 books ... including basic recursions ...
    (sci.math)