On 12/02/2011 03:35 PM, Olemis Lang wrote:
...
    My question now is, how can TracPM find the TeamCalendar
    implementation of IResourceCalendar? I think I want to set up the
    calendar as an extension point and then I can find them by interface
    name but if I only want one active at a time, how do I disable and
    enable them? Where do the names in trac.ini come from? Do I want

    tracjsgantt.tracpm.__SimpleCalendar = disabled

    ?


extension points do the trick and hide all the underlying magic involved
... Take a look at the code of PermissionSystem for instance , or maybe
some other @ trac.web core components , so as to see how this works .

I can set up an extension point but my question is "where do I get the name from that I put in trac.ini to enable/disable each instance? Presumably, I'd use the same name in an ExtensionOption.

trac.ini:

  teamcalendar.calendar.TeamCalendar = enabled
  tracjsgantt.tracpm.SimpleCalendar = disabled

or in my source:

    cal = ExtensionOption('TracPM',
                          'calendar',
                          IResourceCalendar,
                          'teamcalendar.calendar.TeamCalendar')

But those names are an educated guess and I'd rather know how to derive/create them than hope I'm right.
--
Christopher Nelson, Software Engineering Manager
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY  12019
Tel: +1.518.877.5173, Fax: +1.518.877.8346 www.sixnet.com

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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-users?hl=en.

Reply via email to