Re: [Zope-dev] Please comment [Re: self = self.this() in Factory Methods]

2002-02-07 Thread Stefan H. Holek

At 04.02.2002 21:10 +0100, Stefan H. Holek wrote:
At 02.02.2002 08:08 +1000, Andrew Kenneth Milton wrote:

Since it seems this is going to occur repeatedly, having spent 10 seconds
looking at it, it seems that the 'correct' way is to call

self.Destination()._setObject()

so in essence self.Destination().__allow_groups__ will also get what we
want.

The call is not needed most of the time as the dispatcher defines 
__getattr__(). It does however not define __setattr__().

I would still appreciate some comments on what kind of bad things can 
happen if the call to Destination() is omitted. Where will the attribute 
be set? Could the name __allow_groups__ be (accidentially) acquired?

As nobody seems to know (care?) I suggest, Andrew, you add that one line to 
be on the safe side and to shut me up ;-). Zope's own UserFolder *does* 
have it after all.

Case closed,
Stefan


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Please comment [Re: self = self.this() in Factory Methods]

2002-02-04 Thread Stefan H. Holek

At 02.02.2002 08:08 +1000, Andrew Kenneth Milton wrote:

Since it seems this is going to occur repeatedly, having spent 10 seconds
looking at it, it seems that the 'correct' way is to call

self.Destination()._setObject()

so in essence self.Destination().__allow_groups__ will also get what we
want.

The call is not needed most of the time as the dispatcher defines 
__getattr__(). It does however not define __setattr__().

I would still appreciate some comments on what kind of bad things can 
happen if the call to Destination() is omitted. Where will the attribute be 
set? Could the name __allow_groups__ be (accidentially) acquired?

Thanks again,
Stefan


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )