[Uml-devel] *Data objects

Luis De la Parra Blum lparrab at gmx.net
Sun Feb 2 15:05:10 UTC 2003


Hi all,
Just realized I had forgotten to adjust the save / load code to keep 
information about Diagram (canvas) size.... objects in the diagram but 
outside of the default size were not lost, but just hidden and you had to 
adjust the size manually each time in order to see them.

It's now fixed in CVS, but I must admit it's a very ugly hack. The problem is 
that  the save / load is done by the UMLViewData and not by UMLView itself, 
and not only that, but for saving, the UMLDoc called UMLView::saveToXMI, 
which did nothing but call UMLViewData::saveToXMI , but for loading, the 
UMLDoc object called UMLViewData::loadFromXMI directly !!, I changed this so 
that it is at least balanced (doc calls view, view forwards call to data)

--ok, back to the problem-- UMLViewData does not have anyway to find its 
UMLView or the Diagram it is related to, so there was no way to save 
width/height info from UMLViewData::save/load ... unless we added that info 
to the Data object  (and I did not want to add *anything* else to the evil 
Data object)

the hack I am talking about is that now some part of the info is saved by the 
View and some part by the Data. I don't like this, but I didnt feel ready to 
kill the Data object once and for all,  and I did not want to keep w/h info 
in the Data.

any thoughts?
I am thinking we can (for now) keep the Data, but move the whole load/save to 
UMLView so that it is all in one place, and eventually get rid of 
UMLViewData. what do you think?

Please comment on this. otherwise I'll just move all save/load functionality 
to UMLView to have all in one place.

saudos
luis




More information about the umbrello-devel mailing list