Re: [Zope3-Users] Question about IOrderedContainer interface

2007-02-27 Thread Thierry Florac
Le lundi 26 février 2007 à 19:39 +0200, Marius Gedminas a écrit :
 On Mon, Feb 26, 2007 at 05:28:12PM +0100, Thierry Florac wrote:
  I have a little question about the IOrderedContainer interface.
  
  Actually, this interface is derived from IContainer, and only contains
  a single method, updateOrder() which is an updating method.
  
  When I create a subclass of OrderedContainer for which I'd like only a
  limited set of roles to have reordering permission,
 ...
  So I can see only three ways to make this working :
 ...
   - wait for someone else to give me another solution, which wouldn't
  need to modify Zope source code :-)
 
 require
   interface=IReadContainer
   permission=zope.View /
 require
   interface=IWriteContainer
   permission=zope.ManageContent /
 require
   attributes=updateOrder
   permission=zope.ManageContent /

I agree with you that I can use this workaround.
But is it really fine to define a writing interface as a sub-interface
of IReadContainer which, as said before, just need reading
permissions ??
Using attributes here in ZCML is only OK because we have a single
method in IOrderedContainer interface...

Thanks anyway,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Events

2007-02-27 Thread whit

snip /

I would personally like to see some form of disabling event handlers.


+1

-w

--

-- d. whit morriss --
- senior engineer, opencore -
- http://www.openplans.org  -
- m: 415-710-8975   -

If you don't know where you are,
 you don't know anything at all 



Dr. Edgar Spencer, Ph.D., 1995

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Cannot view the instances after I refresh the product in ZMI

2007-02-27 Thread David Johnson

Paste the code here. :)

On Feb 27, 2007, at 6:16 AM, Alex Cheng wrote:


Hello,

I have modified my product code and click refresh in ZMI to update  
the product. Unfortunately when I view its instance in zope. The  
error message is follows:


Error Type: TypeError
Error Value: 'NoneType' object is not callable

Could you help me?

Thanks.
--
powered by python
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Dict Widget

2007-02-27 Thread David Johnson
I've seen posts about this but I am confused. Is there a Dict widget?  
I tried it and I received IInputWidget errors.


myfield = Dict(title=u'My Dictionary',
key_type=TextLine(),
value_type=TextLine())

  File /Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- 
fat-2.4/zope/component/_api.py, line 103, in getMultiAdapter

raise ComponentLookupError(objects, interface, name)
ComponentLookupError: ((zope.schema._field.Dict object at  
0x3a00190, zope.publisher.browser.BrowserRequest instance  
URL=http://127.0.0.1:8080/My%20Contacts/+/addContact.html),  
InterfaceClass zope.app.form.interfaces.IInputWidget, u'')


--
Warm regards,
David
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Dict Widget

2007-02-27 Thread Vinny
On Tue, 27 Feb 2007 21:24:10 +0100
David Johnson [EMAIL PROTECTED] wrote:

 I've seen posts about this but I am confused. Is there a Dict
 widget? I tried it and I received IInputWidget errors.
 
 myfield = Dict(title=u'My Dictionary',
   key_type=TextLine(),
   value_type=TextLine())
 
File /Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- 
 fat-2.4/zope/component/_api.py, line 103, in getMultiAdapter
  raise ComponentLookupError(objects, interface, name)
 ComponentLookupError: ((zope.schema._field.Dict object at  
 0x3a00190, zope.publisher.browser.BrowserRequest instance  
 URL=http://127.0.0.1:8080/My%20Contacts/+/addContact.html),  
 InterfaceClass zope.app.form.interfaces.IInputWidget, u'')
 


I got the same thing trying to use a Tuple:

  File
/usr/local/www/Zope3/lib/python/zope/app/form/browser/itemswidgets.py,
line 56, in CollectionInputWidget IInputWidget) File
/usr/local/www/Zope3/lib/python/zope/component/_api.py, line 103, in
getMultiAdapter raise ComponentLookupError(objects, interface, name)
ComponentLookupError: ((zope.schema._field.Tuple object at 0xad84a4c,
None, zope.publisher.browser.BrowserRequest instance
URL=http://zope.palaceofretention.ca:8080/hey/++preferences++/@@index.html),
InterfaceClass zope.app.form.interfaces.IInputWidget, u'')

It seems the more complex field types might need a custom
widget.  I simply broke the tuple down into its parts and
avoided the lack of a tuple input widget.

Vinny
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users