Hi Daria & Norbert,
>> For
the refactoring of pages we need to know the (direct) parent
>> of each SW2WikiObject (especially SW2DocumentItem subclasses).
>> SW2WikiObject has the instance variable owner, but it is not
>> always used.
>> We thought it would may be of general interest to always have
>> this attribute. Would it be possible to get this feature?
>>
>
> In my opinion, back-links are generally a bad thing and therefor
> I try to avoid them whenever possible. Have a look at the i-var
> parent in SW2Structure and SW2Decoration and all the hassle
> around this. Back-links duplicate information and it makes
> several things, such as copying, more difficlut.
>
As far as we know, DocumentItem matches a composite pattern. Most
composite patterns do have parent links (e.g. Java AWT and there
seems no problem).
does Java supports copying of an AWT window and then have two
independent windows on the screen afterwards? Does it support
transparent serialization? Am I able to load an AWT window from a
file and display on the screen with the same state when it was saved?
Am I able to have the same AWT window on two machines sharing the
same state and model over a TCP connection? Am I able ... I doubt so :-)
I guess it is no problem to implemented a parent link, however make
sure that copying works properly. As usual, for such a kind of patch,
I suggest that you do the modifications directly in SmallWiki2-Model
and then send the Monticello-Package to me. If there is a convincing
number of tests, I will merge it with the lastest code as soon as
possible.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch