Page 1 of 1

Plugin stopped working...

Posted: Mon May 10, 2010 2:06 pm
by drtech
Did something change in the fillins() or something between 7.0 and 7.1? my plugin now causes and unhanded exception with 7.1... I will have to figure out what changed....32bit to 64 bit int change?

System.MissingMethodException: Method not found: 'Int64 OpenDentBusiness.Patient.get_PatNum()'.
at PluginDrTECH.ContrAccountP.FillInsInfo()
at PluginDrTECH.ContrAccountP.RefreshModuleScreen_end(Object sender, Family famCur, Patient patCur, DataSet datasetMain, Double ppbalTotal, Boolean selectingFamily)
at PluginDrTECH.Plugin.HookAddCode(Object sender, String hookName, Object[] parameters)
at OpenDentBusiness.Plugins.HookAddCode(Object sender, String hookName, Object[] parameters) in C:\SVN\Beta\OpenDentBusiness\Plugins\Plugins.cs:line 66
at OpenDental.ContrAccount.RefreshModuleScreen(Boolean isSelectingFamily) in C:\SVN\Beta\OpenDental\Main Modules\ContrAccount.cs:line 1850
at OpenDental.ContrAccount.ModuleSelected(Int64 patNum) in C:\SVN\Beta\OpenDental\Main Modules\ContrAccount.cs:line 1715
at OpenDental.FormOpenDental.SetModuleSelected() in C:\SVN\Beta\OpenDental\Main Modules\FormOpenDental.cs:line 2775
at OpenDental.FormOpenDental.myOutlookBar_ButtonClicked(Object sender, ButtonClicked_EventArgs e) in C:\SVN\Beta\OpenDental\Main Modules\FormOpenDental.cs:line 2753
at OpenDental.OutlookBar.OnButtonClicked(OutlookButton myButton, Boolean myCancel) in C:\SVN\Beta\OpenDental\User Controls\OutlookBar.cs:line 321
at OpenDental.OutlookBar.OnMouseUp(MouseEventArgs e) in C:\SVN\Beta\OpenDental\User Controls\OutlookBar.cs:line 313
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Re: Plugin stopped working...

Posted: Mon May 10, 2010 8:06 pm
by jordansparks
I don't see a method in 7.0 called Patient.get_PatNum(). So I'm really not sure what you were doing in the first place. Are you sure that's exactly what it says? Maybe that's one of your methods?

Re: Plugin stopped working...

Posted: Tue May 11, 2010 6:13 pm
by drtech
you changed a parameter in InsPlans.GetInsUsedDisplay (which my plugin uses, so it was crashing in my FillInsPlan() ) ...now I have to pass the benefits...so I just copied your new code from labelInsRem_MouseEnter in the main program and it works again....

thanks...

Re: Plugin stopped working...

Posted: Tue May 11, 2010 9:12 pm
by jordansparks
Ah, yes. That kind of issue will not be uncommon with each new version since you are making use of bits and pieces of the main code. Some plugins operate in their own little sandbox, but yours is more interactive, so more maintenance.

Re: Plugin stopped working...

Posted: Wed May 12, 2010 3:18 pm
by wjstarck
I get the same error, and my plugin code is fairly segregated from OD code.

Where to look to track this down, since there doesn't seem to be any such method in 7.0 or 7.1?

Here's what I get:

System.MissingMethodException was unhandled
Message="Method not found: 'Void OpenDentBusiness.Patient.set_PatNum(Int64)'."
Source="Anesthesia"
StackTrace:
at Anesthesia.FormAnestheticRecord.selectPatientToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Anesthesia.Plugin.LaunchToolbarButton(Int64 patNum)
at OpenDentBusiness.Plugins.LaunchToolbarButton(Int64 programNum, Int64 patNum) in C:\Users\wjs\Desktop\ODVersions\opendental7.1b\opendental7.1\OpenDentBusiness\Plugins\Plugins.cs:line 75
at OpenDental.ProgramL.Execute(Int64 programNum, Patient pat) in C:\Users\wjs\Desktop\ODVersions\opendental7.1b\opendental7.1\OpenDental\Data Interface\ProgramL.cs:line 30
at OpenDental.ContrAppt.ToolBarMain_ButtonClick(Object sender, ODToolBarButtonClickEventArgs e) in C:\Users\wjs\Desktop\ODVersions\opendental7.1b\opendental7.1\OpenDental\Main Modules\ContrAppt.cs:line 3337
at OpenDental.UI.ODToolBar.OnButtonClicked(ODToolBarButton myButton) in C:\Users\wjs\Desktop\ODVersions\opendental7.1b\opendental7.1\OpenDental\UI\ODToolBar.cs:line 249
at OpenDental.UI.ODToolBar.OnMouseUp(MouseEventArgs e) in C:\Users\wjs\Desktop\ODVersions\opendental7.1b\opendental7.1\OpenDental\UI\ODToolBar.cs:line 229
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at OpenDental.ProgramEntry.Main(String[] args) in C:\Users\wjs\Desktop\ODVersions\opendental7.1b\opendental7.1\OpenDental\Main Modules\ProgramEntry.cs:line 44
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Re: Plugin stopped working...

Posted: Wed May 12, 2010 5:50 pm
by jordansparks
Are you sure your Configuration Manager is set to compile all projects?

Also, I think it's related to us switching the Patient class over to the crud layer. You can see that it now inherits from TableBase. Previously, for example, PatNum was a property. Now it's a public field. And those errors (which are different if you look closely) look like the get/set for a property. That's why I asked about all the projects compiling.

Re: Plugin stopped working...

Posted: Fri May 14, 2010 7:09 am
by wjstarck
jordansparks wrote:Are you sure your Configuration Manager is set to compile all projects?
Yes.
Also, I think it's related to us switching the Patient class over to the crud layer. You can see that it now inherits from TableBase. Previously, for example, PatNum was a property. Now it's a public field. And those errors (which are different if you look closely) look like the get/set for a property.
I notice that Patient declared as

Code: Select all

 private Patient patCur 
in, say, FormPerio refers to Patient.cs in OpenDentBusiness > Tabletypes (which as you indicated now inherits from TableBase). However, in my Plugin, the same declaration (mine is public) refers to Patient [from Metadata] which is where all the get-sets come from.

Am I missing something simple?

Re: Plugin stopped working...

Posted: Fri May 14, 2010 8:32 am
by jordansparks
If your metadata is showing get-sets, then that means you have an OpenDentBusiness.dll that is not of the current version. Perhaps delete your entire obj folder? I don't know.

Re: Plugin stopped working...

Posted: Fri May 14, 2010 8:49 am
by wjstarck
Thanks, that points me in the right direction...