[Zope3-dev] Bug in Choice/Vocabulary/widget

Roger Ineichen r.ineichen at projekt01.ch
Sun May 16 18:51:47 EDT 2004


There is a bug somewhere arround the Choice/Permission Vocabulary
or the Widget of the Permission Vocabulary.

In the file:
zope\app\schemacontent\browser\__init__.py

at line 80 + 81 there should getData() be change to the 
method .getInputValue(). 

I'm not shure if it's getInputValue(), but I'm shure
getData() is wrong.

HEAD:
-----
line 80: getPerm = getattr(self, name+'_get_perm_widget').getData()
line 81: setPerm = getattr(self, name+'_set_perm_widget').getData()

should be:
----------
line 80: getPerm = getattr(self, name+'_get_perm_widget').getInputValue()
line 81: setPerm = getattr(self, name+'_set_perm_widget').getInputValue()

That's just one part the real Bug I see is:
------------------------------------------

If you change the permissions in the ZMI, in the update() method at
line 82: perms[name] = (getPerm, setPerm)
the permissions are saved back to the persistent dict of the utilty.

I you restart the server the permissions are the new saved one.
There are perssistent how the should be, but the widget doesn't
show the new permissions. As long as you change the permissions
the new permissions are shown in the dropdwon box, except
you restart Zope. 

I could not find out why the permission does show correct till you restart
Zope?

BTW,
The interfaces in the Permission Vaocabulary are not alphabetic ordered,
that's sometimes hard for to lookup a interface.



Regards
Roger Ineichen
_____________________________
END OF MESSAGE




More information about the Zope3-dev mailing list