Hooks for custom plugins
-
- Posts: 5
- Joined: Mon Aug 10, 2015 8:38 am
Hooks for custom plugins
I have written some plugins for a client, and I am in need of the following Hooks to be added.
FormOpenDental.Load_end
FormPatientAddAll.butOK_Click_beginning
FormPatientEdit.butOk_Click_ending
FormPatientEdit.FormPatientEdit_Load_ending
FormPatientAddAll.FormPatientAddAll_Load_end
FormOpenDental.Load_end
FormOpenDental.Load_end
FormOpenDental.Load_end
FormReportsMore.FormReportsMore_Load_beginning
FormPatientEdit.butOK_Click_ending
Thank you.
FormOpenDental.Load_end
FormPatientAddAll.butOK_Click_beginning
FormPatientEdit.butOk_Click_ending
FormPatientEdit.FormPatientEdit_Load_ending
FormPatientAddAll.FormPatientAddAll_Load_end
FormOpenDental.Load_end
FormOpenDental.Load_end
FormOpenDental.Load_end
FormReportsMore.FormReportsMore_Load_beginning
FormPatientEdit.butOK_Click_ending
Thank you.
Re: Hooks for custom plugins
First, it is typical to include a snippet of code where you want the hook. That way I know exactly where you want it. Without that it could get placed in an incorrect location and that could interfere with your plug-in.
Second, based on your naming convention of these hooks you want them either at the start or end of each specified method, correct?
Third, FormOpenDental.Load_end is listed four times. Did you mean to ask for a different hook? FormPatientEdit.butOK_Click_ending is also listed twice.
Finally, FormOpenDental.Load_end and FormReportsMore_Load_beginning already exist.
I am not sure how to proceed with adding these hooks. A bit more information would be appreciated.
Second, based on your naming convention of these hooks you want them either at the start or end of each specified method, correct?
Third, FormOpenDental.Load_end is listed four times. Did you mean to ask for a different hook? FormPatientEdit.butOK_Click_ending is also listed twice.
Finally, FormOpenDental.Load_end and FormReportsMore_Load_beginning already exist.
I am not sure how to proceed with adding these hooks. A bit more information would be appreciated.
-
- Posts: 5
- Joined: Mon Aug 10, 2015 8:38 am
Re: Hooks for custom plugins
Sorry about that. Here is the code for the ones I need added.
OpenDental.FormPatientAddAll:
if(Plugins.HookMethod(this, "FormPatientAddAll.butOK_Click_beginning"))
{
return;
}
OpenDental.FormPatientAddAll:
Plugins.HookAddCode(this, "FormPatientAddAll.FormPatientAddAll_Load_end");
OpenDental.FormPatientEdit: Add prior to the DialogResult line
Plugins.HookAddCode(this, "FormPatientEdit.butOk_Click_ending", Convert.ToInt32(textPatNum.Text));
OpenDental.FormPatientEdit:
Plugins.HookAddCode(this, "FormPatientEdit.FormPatientEdit_Load_ending", Convert.ToInt32(textPatNum.Text));
Second, based on your naming convention of these hooks you want them either at the start or end of each specified method, correct? Yes.
Third, FormOpenDental.Load_end is listed four times. Did you mean to ask for a different hook? FormPatientEdit.butOK_Click_ending is also listed twice. Ignore the duplicates.
OpenDental.FormPatientAddAll:
if(Plugins.HookMethod(this, "FormPatientAddAll.butOK_Click_beginning"))
{
return;
}
OpenDental.FormPatientAddAll:
Plugins.HookAddCode(this, "FormPatientAddAll.FormPatientAddAll_Load_end");
OpenDental.FormPatientEdit: Add prior to the DialogResult line
Plugins.HookAddCode(this, "FormPatientEdit.butOk_Click_ending", Convert.ToInt32(textPatNum.Text));
OpenDental.FormPatientEdit:
Plugins.HookAddCode(this, "FormPatientEdit.FormPatientEdit_Load_ending", Convert.ToInt32(textPatNum.Text));
Second, based on your naming convention of these hooks you want them either at the start or end of each specified method, correct? Yes.
Third, FormOpenDental.Load_end is listed four times. Did you mean to ask for a different hook? FormPatientEdit.butOK_Click_ending is also listed twice. Ignore the duplicates.
-
- Posts: 5
- Joined: Mon Aug 10, 2015 8:38 am
Re: Hooks for custom plugins
Hey there!
I was wondering if this information that I posted back in August, was sufficient.
I was wondering if this information that I posted back in August, was sufficient.
Re: Hooks for custom plugins
My apologies, I must have missed this when you responded.
I can get all of these into the next version of 15.3, but I have made a few changes shown in bold.
I can get all of these into the next version of 15.3, but I have made a few changes shown in bold.
OpenDental.FormPatientAddAll:
if(Plugins.HookMethod(this, "FormPatientAddAll.butOK_Click_start"))
{
return;
}
OpenDental.FormPatientEdit: Add prior to the DialogResult line
Plugins.HookAddCode(this, "FormPatientEdit.butOK_Click_end",PatCur);
The last one was not added because this hook already exists in this form.OpenDental.FormPatientEdit:
Plugins.HookAddCode(this, "FormPatientEdit.FormPatientEdit_Load_ending", Convert.ToInt32(textPatNum.Text));
All of these should be available when 15.3.25 is released.Plugins.HookAddCode(this,"FormPatientEdit.Load_end",PatCur);
-
- Posts: 5
- Joined: Mon Aug 10, 2015 8:38 am
Re: Hooks for custom plugins
When is that release due out?
Re: Hooks for custom plugins
Today
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com
-
- Posts: 5
- Joined: Mon Aug 10, 2015 8:38 am
Re: Hooks for custom plugins
Should this have been in the subversion source?jsalmon wrote:Today
Re: Hooks for custom plugins
Yes, the commit shows on our bug tracker as:
Plugin Hooks, added hooks to a couple patient windows.