On Nov 4, 2007 2:57 AM, George Lee <[EMAIL PROTECTED]> wrote: > (1) Do the current Archetypes fields not allow retrieving accessors and > mutators in the same way the new ExtensionField does?
No, current fields assume that their mutators have been generated on the current instance, which is not the case for an extended schema. Florian and I thought up archetypes.schemaextender for a usecase where the field toggled a marker interface, so there is no field data to access. But even if you store the field data on the instance directly the mutators are not going to be in place to support standard fields. > (2) Why is it necessary to register a *named* adapter? Because you want to support more than one schema extendor. If you register unnamed adapters, each new extension would have to override any predecessor. > (3) How is this supposed to work on templates, where we can't just do > "context/getTagField"? Is the idea to use views? You use Schema().get(fieldname).getAccessor(instance) if you want to support fields generically, or you use whatever method you defined for your ExtensionField to access the data directly. So, in the original usecase for collective.revelation, you can test for a marker interface to get the same effect. See: http://dev.plone.org/collective/browser/collective.revelation/trunk/collective/revelation/subscription/browser/subscription.py -- Martijn Pieters _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
