I thought of a
'priority' property for structures. This priority
would then be used to sort the elements.
The enhanced children visitor would allow
to do exactly that. You
just have to redefine the default sort-block in the default context
used for new sessions.
Ok, but I need something to base the order on if I want to
sort by
creation time for exemple. In this case, I would need to modify
ChildrenDecoration>>#add: to add an index, or Structure>>initialize to
add a timestamp property. What do you think ?
There are other possibilities:
- Put the new value into a property and initialize it lazily.
- Use the hook method that is called on the class-side of all
concrete decorations when a structure is added to initialize a
property. You don't need the decoration in this case, just the hook.