oship-dev team mailing list archive
-
oship-dev team
-
Mailing list archive
-
Message #01442
Re: [Bug 614863] Re: openehr.Pathable class needs parent() and name() methods
Eduardo, actually I have done the same thing, but in the Pathable class (I
created a constructor for it). Then I added the name() and parent() methods
just to access __parent__ and __name__ attributes.
Diego, I realized that too. Is this going to be a problem? And the __name__
will be the archetypeNodeId?
Em 1 de setembro de 2010 13:38, Diego Manhães Pinheiro <
614863@xxxxxxxxxxxxxxxxxx> escreveu:
> Em 01/09/10 12:43, Eduardo César escreveu:
> > Wagner, I put a "parent=None" in the constructor of the Locatable class
> to
> > address those issues and the other bugs. I did not commit yet because
> some
> > tests are still failing after I did this. I don't know if that one is a
> good
> > approach either, maybe we can exchange some ideas about this matter.
> >
> Use a method instead of an attribute sounds better,IHMO. Use a method
> allows avoid unexpected states in a clear form. An important thing that
> you must have keep in mind that the __parent__ and __name__ are related
> to the zope container mechanism. It means that when a code like this "
> container[name] = locatable" is called a will redefining the the parent
> which will be container and __name__ will be the archetypeNodeId .
> This is defined using the zope event system.
> Summarizing: those attributes can be overriden without you expected.
> Be careful when you define then.
>
> --
> openehr.Pathable class needs parent() and name() methods
> https://bugs.launchpad.net/bugs/614863
> You received this bug notification because you are a member of OSHIP
> Development Team, which is a bug assignee.
>
> Status in Open Source Health Information Platform (OSHIP): New
>
> Bug description:
> See this discussion.
> https://bugs.launchpad.net/oship/+bug/608831/comments/4
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~oship-dev<https://launchpad.net/%7Eoship-dev>
> Post to : oship-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~oship-dev<https://launchpad.net/%7Eoship-dev>
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References