Second instance of OD throws ex with Plugins

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Second instance of OD throws ex with Plugins

Post by wjstarck » Fri Feb 04, 2011 9:12 am

A customer of mine likes to have 2 instances of OD running on a single PC with dual monitor support so he can slide one over to use the Anesthetic Record on one monitor and pull radiographs up in the second OD instance for viewing on the other.

However, OD will throw an exception when the second instance of OD tries to load the plugin assembly.

A try-catch around line 1378 of Form OpenDental

Code: Select all

try {
    Plugins.LoadAllPlugins(this);//moved up from right after optimizing tooth chart graphics.  New position might cause problems.
    /It was moved because RefreshLocalData()=>RefreshLocalDataPostCleanup()=>ContrChart2.InitializeLocalData()=>LayoutToolBar() has a hook.
     }
     catch { }
like so resolves the problem, with one or more plugins to load. If this change or something similar could be backported to 7.6, that'd be great.

Thanks.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Second instance of OD throws ex with Plugins

Post by jordansparks » Fri Feb 04, 2011 11:33 am

Well, we can do something similar, but we won't just let it fail silently. We will have to notify the user by means of a popup window that their plug-in failed to load.

Michael will handle it.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Second instance of OD throws ex with Plugins

Post by wjstarck » Fri Feb 04, 2011 12:42 pm

Maybe have it only fail silently when it's a second instance of OD then. Otherwise users get confused.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply