[Zope3-dev] schema initial documentation
Myroslav Opyr
myroslav@zope.net.ua
Mon, 22 Apr 2002 19:17:21 +0300
Martijn Faassen wrote:
>Lennart Regebro wrote:
> =20
>
>>Trying to catch up on the schema discussion:
>>
>>From: "Gary Poster" <garyposter@earthlink.net>
>>
>> =20
>>
>>>One more thought: it might be useful (for me at least :-) to be able t=
o
>>>specify in the schema if an attribute is read-only vs. read-write (vs.
>>>write-only?)
>>> =20
>>>
>>And more than tha: I assume the schema definition will allow a full
>>definition of all property properties right? The schema definition as
>>suggested uses a constructor thus:
>>
>> initials =3D StringField(
>> title=3D"Initials",
>> description=3D"Initials.",
>> )
>>
>>And of course this stringfield "constructor" should be able to take all
>>settings that exist for a StringField, including the error messages, an=
d
>>default settings and so on.
>> =20
>>
>Correct; I'm in the process of fleshing out some of these properties,
>taking from Formulator what I can. I'm also trying to look for other
>schema efforts (such as the XML Schema Datatypes) for inspiration at
>least. Anyone know of any other schema effort I should take a look at?
> =20
>
In warp-framework there is much shorter form, translated into your=20
shema-style it should be:
StringField(self, "initials")
Which would be equal to the call above. Everything else could be=20
calulated (automagically guessed)
StringField(self, "first_name")
Would be equal to:
first_name =3D StringField(
title=3D"First Name",
description=3D"First Name.",
)
Regards,
Myroslav
--=20
Myroslav Opyr
zope.net.ua <http://zope.net.ua/> =B0 Ukrainian Zope Hosting
e-mail: myroslav@zope.net.ua <mailto:myroslav@zope.net.ua>
cell: +380 50.3174578