Plugin Sample - Warn upon exit

Samples and Examples of using the Jiwa 7 framework - including plugins, stand-alone applications and scripts.

Plugin Sample - Warn upon exit

Postby renes » Wed Dec 24, 2014 10:01 am

The attached plugin is a sample which displays a warning message upon exit of Jiwa 7.

This plugin has been created in Version 7.00.64 and won't work on a earlier version that that.

If imported into a later version than 7.00.64 reference might need to be updated or deleted from the References tab.
Attachments
Plugin Warn upon exit.xml
Plugin Warn upon exit - XML File
(29.02 KiB) Downloaded 441 times
renes
Occasional Contributor
Occasional Contributor
 
Posts: 11
Joined: Tue Jan 28, 2014 3:29 pm
Topics Solved: 2

Re: Plugin Sample - Warn upon exit

Postby Scott.Pearce » Wed Jan 27, 2016 10:56 am

Note that this plugin will cause the Jiwa 7 Plugin Scheduler Service to throw an error and fail to start.

This is because the plugin adds a handler to the MDIForm (the main Jiwa screen). The Jiwa 7 Plugin Scheduler Service is "headless" (has no UI), therefore MDIForm is nothing. This means that when the plugin attempts to add it's handler to MDIForm, which is nothing, it will error.

The easiest way to deal with this is to set the Exception Policy of this plugin to "Ignore". Alternatively, the code in the plugin could be modified to check that MDIForm is not nothing before adding a handler to it.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to Samples and Examples

Who is online

Users browsing this forum: No registered users and 1 guest

cron