[Zope3-Users] Interfaces in Schemas

2007-04-18 Thread Hermann Himmelbauer
Hi, I wonder if it's possible to define attributes in a schema that reference other interfaces. For instance, I have a schema for a car and another one for a wheel and what I want to do is something like that: class IWheel(Interface): type = TextLine() class ICar(Interface):

Re: [Zope3-Users] Add unittest

2007-04-18 Thread Benji York
Florian Lindner wrote: I've added an directory "tests", created an empty __init__.py in it and a file named test_proxycache.py which contains: import unittest I *highly* recommend doctests over most uses of unittest. One reasonable example of doctest usage is in zc.copy (http://svn.zope.or

Re: [Zope3-Users] zope.intid and UUIDs

2007-04-18 Thread Benji York
Derek Richardson wrote: I wrote most of it today and there is more code shared between the two than is different. The main differences are: * OOBTrees, instead of an IOBTree and an OIBTree * Different events are fired when an object is registered and unregistered (they could be merged, but th

Re: [Zope3-Users] Interfaces in Schemas

2007-04-18 Thread Martin Aspeli
Hermann Himmelbauer wrote: > > Hi, > I wonder if it's possible to define attributes in a schema that reference > other interfaces. For instance, I have a schema for a car and another one > for > a wheel and what I want to do is something like that: > > class IWheel(Interface): >type

Re: [Zope3-Users] Add unittest

2007-04-18 Thread Marius Gedminas
On Tue, Apr 17, 2007 at 08:37:29PM +0200, Florian Lindner wrote: > I've tried to add a test to my package (I must confess it's my first test.) > > I've added an directory "tests", created an empty __init__.py in it and a > file > named test_proxycache.py which contains: .. > Now I try to run the

[Zope3-Users] Re: zope.intid and UUIDs

2007-04-18 Thread Philipp von Weitershausen
Derek Richardson wrote: All, I've decided to go ahead and write an RFC 4122 UUID utility based on zope.intid (this is for a Plone SoC project, but this bit is pure Zope 3). I wrote most of it today and there is more code shared between the two than is different. The main differences are: *

[Zope3-Users] vary formlib render_submit_button by skin

2007-04-18 Thread Leonardo Rochael
Hi, I was looking at formlib and I found that If i want to customize widgets per skin, I just have to register their view to a different type, e.g.: where "zope.app.skins.colskin" comes from: However I found no such way of customizing the render_submit_button adapter per-skin. All exa

Re: [Zope3-Users] vary formlib render_submit_button by skin

2007-04-18 Thread Fred Drake
On 4/18/07, Leonardo Rochael <[EMAIL PROTECTED]> wrote: I was looking at formlib and I found that If i want to customize widgets per skin, I just have to register their view to a different type, e.g.: As you can for all views. However I found no such way of customizing the render_submit_butto

Re: [Zope3-Users] Interfaces in Schemas

2007-04-18 Thread Darryl Cousins
Hi, On Wed, 2007-04-18 at 09:21 -0700, Martin Aspeli wrote: > > > Hermann Himmelbauer wrote: > > > > Hi, > > I wonder if it's possible to define attributes in a schema that reference > > other interfaces. For instance, I have a schema for a car and another one > > for > > a wheel and what I w

[Zope3-Users] Re: zope.intid and UUIDs

2007-04-18 Thread Derek Richardson
Benji York wrote: Derek Richardson wrote: I wrote most of it today and there is more code shared between the two than is different. The main differences are: * OOBTrees, instead of an IOBTree and an OIBTree * Different events are fired when an object is registered and unregistered (they coul

Re: [Zope3-Users] vary formlib render_submit_button by skin

2007-04-18 Thread Christian Theune
Am Mittwoch, den 18.04.2007, 17:09 -0400 schrieb Fred Drake: > On 4/18/07, Leonardo Rochael <[EMAIL PROTECTED]> wrote: > > I was looking at formlib and I found that If i want to customize widgets per > > skin, I just have to register their view to a different type, e.g.: > > As you can for all vie

[Zope3-Users] Re: zope.intid and UUIDs

2007-04-18 Thread Philipp von Weitershausen
Derek Richardson wrote: *Using* an int id utility, though, doesn't seem to cleanly solve the problem, Why? which makes me wonder if I'm understanding you. If you mean use the intid utility to map keyrefs to int ids and then map int ids to uuids, this has a few problems. Which ones? What I