Jiwa 7 having to close and open jiwa for code changes to  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Jiwa 7 having to close and open jiwa for code changes to

Postby indikad » Wed Jan 22, 2014 4:44 pm

Having to close and open Jiwa each time when make a change in plugin code ( to see the effects of the changes ) can be a bit cumbersome. Is there a way around ?
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Jiwa 7 having to close and open jiwa for code changes to  Topic is solved

Postby Mike.Sheen » Tue Jan 28, 2014 2:50 pm

indikad wrote:Having to close and open Jiwa each time when make a change in plugin code ( to see the effects of the changes ) can be a bit cumbersome. Is there a way around ?


Hi Indika,

Unfortunately not at this time.

The problem is that once an assembly is loaded into an application domain, it cannot be unloaded. So, any subsequent changes to the code for a plugin will mean that the application domain (ie: Jiwa) needs to be unloaded before the plugin assembly can be recompiled and reloaded.

I understand it can be frustrating developing plugins this way - so I'll post a tutorial in the coming days showing how to use a surrogate Jiwa application within Visual Studio to let you develop a plugin within Visual Studio (allowing edit and continue, etc) - and then how you transfer the Visual Studio code to a Jiwa plugin.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Jiwa 7 having to close and open jiwa for code changes to

Postby Mike.Sheen » Mon Feb 03, 2014 9:20 pm

I should clarify this a little more.

We did attempt to allow changes to plugins not to require the exiting of Jiwa 7 to take effect - the "Isolate" checkbox on the plugin header indicates if the plugin is to be isolated to its own application domain. That will cause the plugin to be put into its own application domain, and thus any changes allow the application domain to be unloaded, the plugin recompiled, and reloaded whenever a plugin is changed.

However, it is of limited use if your plugin refers to any classes which do not inherit from MarshalByRef - and as it happens the Windows Forms class does not inherit from MarshalByRef, so your plugin will not be able to interact with any Windows Forms classes (including the Jiwa forms - which inherit ultimately from the System.Windows.Forms.Form class).
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Jiwa 7 having to close and open jiwa for code changes to

Postby Mike.Sheen » Wed Feb 12, 2014 7:54 pm

Ok, I've done a rough guide on how to develop plugins using Visual Studio - here. I hope this addresses your concerns.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests