[Zope-CMF] CMF Collector: Open Issues

2007-01-03 Thread tseaver
The following supporters have open issues assigned to them in this collector
(http://www.zope.org/Collectors/CMF).

Assigned and Open


  mhammond

- Windows DevelopmentMode penalty in CMFCore.DirectoryView,
  [Accepted] http://www.zope.org/Collectors/CMF/366


Pending / Deferred Issues

- FSPropertiesObject.py cannot handle multiline input for lines, text 
attributes,
  [Deferred] http://www.zope.org/Collectors/CMF/271

- Can't invalidate skin items in a RAMCacheManager,
  [Pending] http://www.zope.org/Collectors/CMF/343

- workflow notify success should be after reindex,
  [Deferred] http://www.zope.org/Collectors/CMF/389

- Possible bug when using a BTreeFolder Member folder,
  [Pending] http://www.zope.org/Collectors/CMF/441

- Proxy Roles not Working/Applied to Worflow Transition Scripts,
  [Pending] http://www.zope.org/Collectors/CMF/449

- safe_html filters some tags which should probably not be filtered,
  [Pending] http://www.zope.org/Collectors/CMF/452

- purge_old in runAllImportSteps not working,
  [Pending] http://www.zope.org/Collectors/CMF/455

- PUT handling for Events is broken,
  [Pending] http://www.zope.org/Collectors/CMF/458

- Danger from Caching Policy Manager,
  [Pending] http://www.zope.org/Collectors/CMF/460


Pending / Deferred Features

- Favorite.py: queries and anchors in remote_url,
  [Pending] http://www.zope.org/Collectors/CMF/26

- DefaultDublinCore should have Creator property,
  [Pending] http://www.zope.org/Collectors/CMF/61

- Document.py: universal newlines,
  [Pending] http://www.zope.org/Collectors/CMF/174

- portal_type is undefined in initialization code,
  [Pending] http://www.zope.org/Collectors/CMF/248

- CMFTopic Does Not Cache,
  [Deferred] http://www.zope.org/Collectors/CMF/295

- Wishlist: a flag that tags the selected action.,
  [Pending] http://www.zope.org/Collectors/CMF/301

- CMFDefault should make use of allowCreate(),
  [Pending] http://www.zope.org/Collectors/CMF/340

- Nested Skins,
  [Deferred] http://www.zope.org/Collectors/CMF/377

- CatalogVariableProvider code + tests,
  [Pending] http://www.zope.org/Collectors/CMF/378

- manage_doCustomize() : minor additions,
  [Pending] http://www.zope.org/Collectors/CMF/382

- CMF needs View-based TypeInformation,
  [Pending] http://www.zope.org/Collectors/CMF/437

- Marker attributes should be deprecated,
  [Pending] http://www.zope.org/Collectors/CMF/440



___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


Re: [Zope-CMF] Zope 3 events from workflow

2007-01-03 Thread Chris Withers

Martin Aspeli wrote:

To subscribe only to particular transitions, you would need for each
transition object to provide a specific interface. 


Unless you could leverage the same kind of thing that makes named 
adapters work...



zope.event?), it registers a general subscriber for IObjectEvent and then
redispatches for multi-subscribers based on (obj, event), i.e. you register
a handler for the object type and for the event type.


I actually don't like this pattern, it seems needlessly inefficient. Why 
not just set the right damned event going from the start? ;-)



We could do the same for a transition event, e.g. re-dispatching based on
object type, workflow type and/or transition type.


Sounds like it would fit the idiom, even if I don't like it...


However, in DCWorkflow, transitions are all of the same type, just with
different ids, and in WorkflowTool, actions (of which DCWorkflow transitions
are one common type) are also identified by a string only.


See my comment about named thingies above, although this is largely hand 
waving on my part...



It would be possible to define some kind of re-dispatch that used named
adapters, but even though subscribers are just adapter factories under the
hood (you'll see the slightly odd syntax of a loop that just retrieves all
possible adapters from the component registry, doing nothing with the return
values, because the event subscriber registry is using the same mechanism as
the adapter factory registry, but the factory that is called normally does
the event work), I don't think there's any natural syntax for registering
named subscribers. You *could* do this though:

@zope.component.adapter(Interface, IWorkflowTransitionEvent)
def dispatch_transitions(obj, event):
transition = event.transition.id
factory = getMultiAdapter((obj, event),
provides=INamedTransitionSubscriber, name=transition)

subscriber handler=.dispatch.dispatch_transitions /

- which would be generic and only be needed once.

and then for each transition:

@zope.component.implementer(INamedTransitionSubscriber)
@zope.component.adapter(IMyObject, IWorkflowTransitionEvent)
def react_to_published(obj, event):
...

and in ZCML:

adapter factory=.subscribers.react_to_published name=publish /

I'm not sure this is any easier or less hacky than doing the subscriber
like:

@zope.component.adapter(Interface, IWorkflowTransitionEvent)
def dispatch_transitions(obj, event):
transition = event.transition.id
if transition == 'publish':
   ...


Yeah, decorators suck when abused and zcml just sucks ;-)

*sigh*

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests