I think I've asked something like this before but if I got a clear
answer, I can't find it now. Sorry for the repeat if that's the case.
I'm familiar with
http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture and have
managed to implement some Extension Points and toyed with
ExtensionOption, etc. but none of that seems to quite do what I want.
In the Project Management support for TracJSGantt, I have:
class ITaskSorter(Interface):
and then implement two different sorters. My idea is that a user would
install the plugin then use Trac admin to enable the sorter that better
suits their needs (or implement their own and disable both of the
built-in sorters). But how do I make sure that only one sorter is
enabled? Do I have to resort to something like:
sorters = ExtensionPoint(ITaskSorter)
count = 0
for sorter i self.sorters:
count++
theSorter = sorter
if count > 1:
...raise an error...
? It seems there must be an idiom for controlling what EP is active
from admin and getting that one from a plugin.
(This is in 0.11.6, BTW.)
Chris
--
Christopher Nelson, Software Engineering Manager
Sixnet, a Red Lion business | www.sixnet.com
+1 (518) 877-5173, x135
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en.