-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 15.11.2011 13:17, wrote Chris Nelson:
> I'm working on teasing the scheduling parts of TracJSGantt out into a
> second class or maybe a second plugin so that the scheduling
> algorithm is pluggable.  I have it as an ExtensionPoint that
> implements ITaskScheduler but I'm not sure this is quite the right
> thing to do. ...
> 
> But that seems awkward.
> 
> A component is a singleton but if I made the scheduler a component, I
> don't know how to *find* it in my code.
> 

So use the ExtensionOption [1] for that. An existing use case can be
found in AccountManagerPlugin [1]. There is even an algorithm in the
same plugin to retrieve all available/enabled implementations of the
interface in question. So you could even provide a nice dropdown for the
web_ui, if you want.

Yours,

Steffen Hoffmann
(hasienda)


[1] http://trac.edgewall.org/browser//trunk/trac/config.py?rev=10857#L675
[2]
https://trac-hacks.org/browser/accountmanagerplugin/trunk/acct_mgr/db.py?rev=10494#L63?rev=10494
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7CZSAACgkQ31DJeiZFuHcP0ACeNN8UQDa5rP4l/Ys4cS0f/Di8
puQAmwUhInZDlvPS/03mPZd7SjpovW8p
=KwJt
-----END PGP SIGNATURE-----

-- 
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.

Reply via email to