Hi Chris!

Chris Withers wrote:
I'm trying to get Plone 2.1 to SFTU a bit more by shushing its deprecation warnings...

Getting there but stumped as to what to do with their call to getActionById in CMFPlone/Portal.py...

They use it to turn for example 'view' into 'base_view', but no non-deprecated way to do this seems to exist :-(
The deprecation warning also seems misleading:

getActionInfo()[\'url\']

...will net you a TypeError explaining that getActionInfo takes a argument that isn't supplied. Looking at the docs, an action_chain, but I have no idea what one of them is...

'action_chain' is a sequence of 'action paths'. 'action paths' are the unique identifiers of Actions. 'view' doesn't identify an Action because there might be 'object/view' and 'foo/view'. 'action paths' have the format <category>/<id>.

The first available action in the 'action_chain' is returned.

queryMethodID()

..similarly takes an argument: alias.
Smells like maybe what I should be going, but queryMethodID('view') returns me a None :-(

Any ideas?

You have a different use case than those mentioned in the deprecation warning. getActionObject(action_path) is the method you are looking for.

But please note: The whole PloneGenerator class is nasty code and I'm in the process of removing its base class PortalGenerator from the CMF trunk. PloneGenerator will no longer work with the trunk / CMF 2.0.


Cheers,

        Yuppie

_______________________________________________
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

Reply via email to