[ZDP] Re: Ordering objects and ZDP Tools (again)
Maik Roeder
roeder@berg.net
Tue, 14 Mar 2000 12:28:12 +0100
Hi Rik !
Here are the alternatives:
1. Implementation with a fixed property in DocumentFolder
Negative:
Each object will have an order property even if it is not needed
Only one order possible although we could add another ordertype when needed
Positive:
You can always count on an order property being there
2. Implementation with a fixed property in each Subclass of DocumentFolder
Negative:
Each Subclass object will have an order property
Only one order possible although we could add another ordertype when needed
Positive:
Only those subclasses of DocumentFolder that need an order get one
3. Implementation with free property on instances
Negative:
You have to pay attention that the property is really there
You have to define and keep conventions on naming the properties
Positive:
You can support multiple order properties as needed
I would vote for the first possibility. We just introduce a new property
"order" to the DocumentFolder property sheet. This is set to a default
of 0. Each existing ZClass now has this property, and it is set to 0.
Each newly created ZClass instance will also get the property set to 0
when it is created, which would be provided for by the DocumentFolder
constructors.
It is up to the user to decide if he wants to change the order of
the items. This will not happen too often, I would think. You can add
the funtionality of changing the order into the DocumentFolder, which
is the best place to put it, and it would be generic. No need to think
about property naming conventions and all this.
It is up to the views to decide whether they want to respect the order
provided. Views can also decide what to do with the orders with a value
of 0. Views also don't have to worry about different naming schemes
and also the Catalog can now sort on the order, which may be needed.
I can think of no other way to keep things more simple. I think
we only need one order, but if you can show me that we really need
different ways of ordering in one Folder, then I will have to admit
that my vote is wrong.
Greetings,
Maik Röder