On Fri, Dec 2, 2011 at 3:17 PM, Chris Nelson <[email protected]>wrote:
> I'm working on calendar-based scheduling in the TracJSGantt chart. I > define a IResourceCalendar interface and provide a stupid implementation as > a proof of concept. My implementation is the class SimpleCalendar in the > tracpm.py module of my plugin and elsewhere in that module, I simply do: > > self.cal = SimpleCalendar(self.env) > > But now I'd like to modify Team Calendar plugin to implement > IResourceCalendar. I edited calendar.py to add: > > from tracjsgantt.tracpm import IResourceCalendar > > then added IResourceCalendar to the list of interfaces implemented by > TeamCalendar component and added a quick, simple implementation of the > IResourceCalendar method. > > 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 . ;) -- Regards, Olemis Facebook => http://www.facebook.com/olemis Twitter => http://www.twitter.com/olemislc (@olemislc) Blog ES => http://simelo-es.blogspot.com Blog EN => http://simelo-en.blogspot.com Quora => http://www.quora.com/olemis Youtube => http://youtube.com/user/greatsoftw Featured article : Datos de autor bajo resultados de búsqueda de Google<http://feedproxy.google.com/~r/simelo-news/~3/k1F5K6CX91s/datos-de-autor-bajo-resultados-de.html> Get a signature like this. <http://r1.wisestamp.com/r/landing?promo=17&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_17> CLICK HERE.<http://r1.wisestamp.com/r/landing?promo=17&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_17> -- 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.
