[Zope3-dev] Accessing object data when using Schemas?

Adam Summers adam@4js.com.au
Thu, 24 Apr 2003 21:39:23 +0800


Hi all,

I've been looking at zope3 development for a month or so in my spare
time, and am planning to help as soon as I 'get up to speed' on the
architecture, so to speak.

Despite all the grumbling of lack of documentation, etc, etc, Jim
Fulton's tutorial slides help a lot for showing how it works.

I've got a question:

If the config.zcml speficies the content as this:
<content class=".contact.Contact">
  <implements
     interface="zope.app.interfaces.annotation.IAttributeAnnotatable" 
     />
  <factory
      id="zopeproducts.contact"
      permission="zopeproducts.contact.ManageContacts" />
  <require
      permission="zope.View"
      interface=".interfaces.IContact" />
....

And the interfaces.Icontact is this: 

from zope.schema import TextLine

class IContact(Interface):
    "Provides access to basic contact information."

    first = TextLine(title=u"First name")
    last = TextLine(title=u"Last name")
....

Is it possible to access first and last using something like
http://host:8080/sampleContact/first? I know this doesn't work, but is
there some way? Jim's tutorial says Iwidget - but I can't follow how to
use it.

Thanks in advance,
Adam