Error when custom form closes  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Error when custom form closes

Postby SBarnes » Thu Jan 24, 2019 6:25 pm

Hi Mike,

We are getting the attached error when a custom built from that is based upon JiwaFinancials.Jiwa.JiwaApplication.ProcessAction.UserInterface closes.

Launching the debugger does not throw you to the exception in visual studio, so its not the plugin code that is at issue, do you have any ideas on how to resolve this?
Attachments
cgerror.jpg
error
cgerror.jpg (46.63 KiB) Viewed 1186 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Error when custom form closes

Postby Mike.Sheen » Fri Jan 25, 2019 9:45 am

Hi Stuart,

When a form closes, we persist the position, dimensions and window state (maximized, restored, and so on) into the table SY_FormSettings so when it is re-opened it will be put back in the same size and position and state.

This table has a foreign key constraint to SY_Forms.ClassName - and so the error you are getting would indicate the form's class name does not match what is in SY_Forms. We use GetType.ToString() on the form to determine the class name - so compare that to the entry in SY_Forms to ensure they match.

I think this problem might happen if the class name was renamed in your code at some point after the entry was created in SY_Forms. Hard to know without getting some hands-on with the database + 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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Error when custom form closes

Postby SBarnes » Fri Jan 25, 2019 9:51 am

Hi Mike,

The class has not been renamed, the server is in Azure do you want me to send you the login details as this would probably be quicker than sending you the plugin, by the way when it does it, you have to kill Jiwa with the task manager as it won't close the screen at all?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Error when custom form closes

Postby Mike.Sheen » Fri Jan 25, 2019 11:32 am

SBarnes wrote:Hi Mike,

The class has not been renamed, the server is in Azure do you want me to send you the login details as this would probably be quicker than sending you the plugin, by the way when it does it, you have to kill Jiwa with the task manager as it won't close the screen at all?


Could provide a small plugin which reproduces the issue? For me to remote in and troubleshoot I'd have to bill for that time - plus it's always more efficient for me to debug in a local environment so if needed I can step through our source.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Error when custom form closes

Postby SBarnes » Fri Jan 25, 2019 1:17 pm

Hi Mike,

perhaps we can go around the problem, is there a method that I can override to stop the saving of the settings given the code I have docks it on open anyway?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Error when custom form closes  Topic is solved

Postby SBarnes » Mon Jan 28, 2019 9:27 am

Hi Mike,

I think I've sorted this out, there are two actual custom forms that interact with each other and the second hadn't been added into SY_Forms hence the error when it tried to close the form and the Jiwa code was trying to save the settings.

You can open the second form from a button on the first, obviously there isn't any code that checks for an entry in SY_Forms when a form is shown as most Jiwa based forms launch off the menus and you need an entry in SY_Forms to make this happen.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests