Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
On Mon, 2008-07-07 at 00:46 +0200, Philipp von Weitershausen wrote: description=Object( schema=IFoo, ... ) So the zope.schema.Object field is really about specifying objects that provide a certain schema. It's not for *arbitrary* objects (use

Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Philipp von Weitershausen
El 7 Jul 2008, a las 09:20 , Tim Cook escribió: On Mon, 2008-07-07 at 00:46 +0200, Philipp von Weitershausen wrote: description=Object( schema=IFoo, ... ) So the zope.schema.Object field is really about specifying objects that provide a certain schema. It's not for

Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
On Mon, 2008-07-07 at 09:56 +0200, Philipp von Weitershausen wrote: Now I want to allow description to be any descendant of ItemStructure. So I had hoped that: description=Object( schema=IItemStructure, title=_(uDescription), description=_(uDescription of

Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Philipp von Weitershausen
El 7 Jul 2008, a las 12:06 , Tim Cook escribió: Am I correct in thinking that the above definition of Activity.description will constrain the possible types to the classes implementing IItemStructure or a subclass of it? Yes, it constraints the value of the 'description' attribute to any

Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
Answering my own questions: On Mon, 2008-07-07 at 10:20 -0300, Tim Cook wrote: All of my source files have the unicode declaration: # -*- coding: utf-8 -*- as the first line. Do those strings inside the list have to be marked as unicode? for example: [([u'include',

SOLVED! Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
... and I've learned a lot thanks to you patience. On Mon, 2008-07-07 at 12:41 -0300, Tim Cook wrote: I've been Googling for a script I can run against all of my source to test characters for unicode just in case there are more of those that I copied into title or description fields. If you

Not Really SOLVED! Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
On Mon, 2008-07-07 at 13:58 -0300, Tim Cook wrote: ... and I've learned a lot thanks to you patience. On Mon, 2008-07-07 at 12:41 -0300, Tim Cook wrote: I've been Googling for a script I can run against all of my source to test characters for unicode just in case there are more of those

Re: Not Really SOLVED! Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Benji York
On Mon, Jul 7, 2008 at 1:28 PM, Tim Cook [EMAIL PROTECTED] wrote: Okay, the problem is defined but it really isn't a solution for me. It seems that Zope has defined 'description' as a keyword not allowed in schema definitions. That's rather odd. Can you construct a small example (say, a

Re: Not Really SOLVED! Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
On Mon, 2008-07-07 at 13:34 -0400, Benji York wrote: On Mon, Jul 7, 2008 at 1:28 PM, Tim Cook [EMAIL PROTECTED] wrote: Okay, the problem is defined but it really isn't a solution for me. It seems that Zope has defined 'description' as a keyword not allowed in schema definitions.

Re: Not Really SOLVED! Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Fred Drake
On Mon, Jul 7, 2008 at 2:25 PM, Tim Cook [EMAIL PROTECTED] wrote: Okay. But before I do that. Is my approach to initializing an instance correct or is the problem the way I handled the keywords? ... for n,v in kw.items(): setattr(self,n,v) There are people who like this

Re: Not Really SOLVED! Re: [Zope3-Users] Re: zope.schema Question

2008-07-07 Thread Tim Cook
On Mon, 2008-07-07 at 13:34 -0400, Benji York wrote: On Mon, Jul 7, 2008 at 1:28 PM, Tim Cook [EMAIL PROTECTED] wrote: Okay, the problem is defined but it really isn't a solution for me. It seems that Zope has defined 'description' as a keyword not allowed in schema definitions.

[Zope3-Users] Re: zope.schema Question

2008-07-06 Thread Philipp von Weitershausen
Tim Cook wrote: I have a class attribute defined in an interface as such: description=Object( title=_(uDescription), description=_(uDescription of the activity.), required=True, ) I used Object because this attribute can be one of several different class