[Uml-devel] Good or bad: "m_pObject is already set" in UMLWidget::loadFromXMI() ??

Oliver Kellogg Oliver.Kellogg at t-online.de
Sun Aug 1 12:09:06 UTC 2004


Hi,

I looked into this and added a TODO at UMLView::loadWidgetFromXMI().
In essence, IMHO the widget constructors that take an UMLObject arg
are evil and should be removed.

For the time being, I have removed the debug message about m_pObject
already being set.

Bye,

Oliver


On Mon, 2004-07-26 at 19:06, Achim Spangler wrote:
> [...]
> Am Dienstag, 27. Juli 2004 04:11 schrieb Oliver Kellogg:
> > On Sun, 2004-07-25 at 14:09, Achim Spangler wrote:
> > > I get this debug message for each usecase and actor widget in my project.
> > > As far as I understand the code, it's good that m_pObject is set at the
> > > time of calling.
> > >
> > > Or is this a sign for a wrong constructor call?
> >
> > Thanks for reminding me, this is something I want to resolve
> > in time for 1.3.
> >
> > It's somewhat similar to the excess UMLWidget::adjustAssocs() -
> > not hazardous, just superfluous calls.
> I looked yesterday into the code - and found _no_ unneded calls!!
> I checked especially for usecasewidget and actorwidget.
> 
> Your debug message is written in UMLWidget::loadFromXMI().
> The indicated setting of m_pObject is performed in the standard constructor 
> which is called by the UMLView::loadWidgetFromXMI()
> ----------------
> widget = new UseCaseWidget(this, static_cast<UMLUseCase*>(o));
> ---------------
> => the parameter "o" is responsible for setting of m_pObject 
> 
> Additionally, I see no other line in UMLWidget::loadFromXMI(), where m_pObject 
> would be set _normally_ .
> 
> So Oliver please enlighten me - which calls are unneded and where should 
> m_pObject  be set during load?
> 
> Bye,
> Achim





More information about the umbrello-devel mailing list