[Zope] Problems modifying a "global" attribute of a portal tool.

JoseLuis de la Rosa Triviño joseluis.rosa at iavantefundacion.com
Tue Jul 4 07:40:38 EDT 2006


Hi,

 

I'm working with zope 2.9.1 in debug mode.

I have a tool (especifically who_online) where I have created a new class attribute and some methods to modify an read it. A python script is called with a user's click and uses those methods.

My problem is that some times when a user modifies the value of the attribute (a python dicctionary) the action takes no effect or it takes effect only in the current transaction. I'm still newbie in zope.

 

The class attribute is called "members_rooms" and the methods are:

 

def joinedRoom(self, member, room):

        """

            Adds the member to the room's list of members.

        """

        self.members_rooms[member] = room

        logger.info(" %s joined room %s ", member, room)

 

def leftRoom(self, member, room):

        """

            Removes the member from the room where it's supposed

            to be joined. 

        """

        if self.members_rooms.has_key(member):

            del self.members_rooms[member]

            logger.info(" %s left the room %s ", member, room)

 

I get log info messages correctly and if I print the value of members_rooms before and after the statement (del or assignment) printed values are correct, but when I query the value of the attribute from a python script just after the "transaction" has finished, the attribute's value has not changed.

 

May some body help me? What am I doing wrong?

 

WhoOnline is a class (and portal tool) that inherits from SimpleItem, Implicit and PropertyManager.

 

Thank you very much.

JoseLuis de la Rosa Triviño 
Técnico de Desarrollo Software 
FUNDACIÓN IAVANTE 
joseluis.rosa at iavantefundacion.com 
Tel. 951 015 300 

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060704/f982b947/attachment.htm


More information about the Zope mailing list