[Zope3-dev] Back to Job editing

R. David Murray bitz@bitdance.com
Wed, 4 Sep 2002 10:57:45 -0400 (EDT)


On Wed, 4 Sep 2002, Jeffrey P Shell wrote:
> There's the Annotations system, which I haven't looked at at all (is it
> implemented yet?).

Yes.  I don't think it's what you want for defining new property
types, though.  Doing that should be a relative piece of cake:  you
just create a new Schema Field type.  As for argument lists, I
think the idea is to use a Schema that defines the "creation field
list", and a creator method that uses that Schema to render and
validate its forms.  That way the list of fields needs to be updated
in only one place: the Schema.

> This is the other avenue I want to explore with what I've been playing
> with with JobBoardEx and my extensions - instead of the JobList class
> instantiating the instances of the local Job class directly, it queries
> for an IJob factory to stamp out a new Job instance.  This would allow
> me to subclass and extend Job, while still fitting in with the
> expectations of its container, JobList.  This should be possible today,
> but I have no idea how to spell it.  Or maybe adapters are the right
> way...  *shrug*

If JobListEx went through the normal Zope3 object adding mechanism
to add a Job to a JobList, then this capability would exist, and
you'd just need to change some zcml.  I think when JobListEx was
first coded the creation stuff didn't exist, but I thought Gary had
modified it to use it.  I haven't looked at the code yet, though,
so I'm just speaking from imperfect memory of mailing list postings
and commit messages.

--RDM