jjmojojjmojo/Crushinator — Issue #30: manipulate probe 'stack' in derived interrogation
Author: jjmojojjmojo
Created: 2011-11-08 19:15:14+00:00
State: open

Interrogations are defined in a declarative style, and can inherit probes from base or mix-in Interrogations. There needs to be a way to alter the order of the interal list of probes during interrogation definition.

Possible implementation:

```python
class ArchetypesPackage(PythonPackageMetadata, PythonPackageInfo, Language):
"""
An Plone Archetypes egg package
"""

# example of 'add before some other probe'
# 'lang' is in the Language interrogation
archetype_name = Probe(label="Name of the archetype, what's seen in Plone Add... menu",
insert_before='lang')

# example of 'add after some other probe'
# 'email' is in the PythonPackageMetadata interrogation
plonelink = Probe(label="Product page on the plone.org site",
insert_after='email')

# example of 'always put in the top'
is_folderish = BooleanProbe(label="Is this a container (folderish) type?",
position="top")

# example of 'always put to the bottom'
email_updates = BooleanProbe(label="Would you like to recieve e-mail updates?",
position="bottom")
```