some plugin-developer-friendly requests
Posted: Thu Jul 15, 2010 11:44 am
Hello,
Please let me know if I'm just missing something and there's another way I should be looking at all this...
I'd like my plugins to call upon some methods in OpenDental that I can't access in some cases. One example of this I'll use is for my plugin to create treatment plans automatically based on some criteria.
I could always copy some code in the UI layer, or alternately touch the DB directly, but neither of those would be very forward compatible - when changes are made in a future version and I don't notice, my plugin will wreak havoc.
Ideally, I could get all the work done in a lower-level (e.g. OpenDentBusiness) but that has limitations as well (in some cases, some data manipulation is still being done at a higher layer in the UI handlers - Take a look at ContrTreat.OnCreate_Click).
In this particular example, either one (or both) of a couple of things would save my day:
1. A copy constructor / method for tp's -> TreatPlan's
2. PerformXXXX public methods for UI events so they can be fired from outside the class (some examples could include ContrTreat.ToolBarMain_PerformClick, FormOpenDental.ToolBarMain_PerformClick, etc)
I think having both would be very useful, although #2 could arguably encourage some bad practices.
I'd like to make sure I'm making reasonable requests going forward, so please let me know if either of these aren't.
Thanks again,
Please let me know if I'm just missing something and there's another way I should be looking at all this...
I'd like my plugins to call upon some methods in OpenDental that I can't access in some cases. One example of this I'll use is for my plugin to create treatment plans automatically based on some criteria.
I could always copy some code in the UI layer, or alternately touch the DB directly, but neither of those would be very forward compatible - when changes are made in a future version and I don't notice, my plugin will wreak havoc.
Ideally, I could get all the work done in a lower-level (e.g. OpenDentBusiness) but that has limitations as well (in some cases, some data manipulation is still being done at a higher layer in the UI handlers - Take a look at ContrTreat.OnCreate_Click).
In this particular example, either one (or both) of a couple of things would save my day:
1. A copy constructor / method for tp's -> TreatPlan's
2. PerformXXXX public methods for UI events so they can be fired from outside the class (some examples could include ContrTreat.ToolBarMain_PerformClick, FormOpenDental.ToolBarMain_PerformClick, etc)
I think having both would be very useful, although #2 could arguably encourage some bad practices.
I'd like to make sure I'm making reasonable requests going forward, so please let me know if either of these aren't.
Thanks again,