JADE Painter - form is in use?

For questions and postings not covered by the other forums
Jenna
Posts: 1
Joined: Wed Mar 29, 2017 9:33 am

JADE Painter - form is in use?

Postby Jenna » Wed Mar 29, 2017 11:07 am

Our team is a little behind the times and as such we have (in the last few months) upgraded from JADE 6.3.12 to 7.1.08 + available fixes. Have noticed a small issue recently with the JADE painter & we are looking to eliminate our application as a cause. Just asking the question here while I look at a reproducer/upgrading another system.

When running our application, if we open and close a form, then try to open the same form in painter, we are receiving the JADE painter error "form is in use". Has anyone noticed this?

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: JADE Painter - form is in use?

Postby BeeJay » Wed Mar 29, 2017 12:54 pm

This seems to happen occasionally to us when running with the debugger - closing the form sometimes doesn't free up the class. We haven't bothered to look into it too much as it's easy enough just to close the app to work around the problem on the odd occasion the issue occurs. Most of the time we don't run with debugger enabled anyway, so it's not really a major issue as we've never had this problem after closing the form when running the application without debugger.

I'm assuming you don't have production mode enabled in this system?!?

Cheers,
BeeJay.

darrella
Posts: 7
Joined: Sun Nov 06, 2011 6:52 pm
Location: Hobart

Re: JADE Painter - form is in use?

Postby darrella » Tue Apr 04, 2017 4:58 pm

This is our development environment, so production mode is not set. It happens consistently whether we are using the debugger or not.

JohnP
Posts: 73
Joined: Mon Sep 28, 2009 8:41 am
Location: Christchurch

Re: JADE Painter - form is in use?

Postby JohnP » Tue Apr 04, 2017 6:25 pm

My understanding is that the class is marked as "in use" until the application that called it goes away. In other words, it's not good enough to close the form, or even delete the form reference in the calling app. The application that opened the form needs to exit.

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: JADE Painter - form is in use?

Postby BeeJay » Wed Apr 05, 2017 9:11 am

In our system we occasionally get this, but the vast majority of the time simply closing the form in the running app is enough for the class agent to be released/closed and then we can edit/save the form in the Jade Painter.

Are you possibly keeping a reference to the opened form somewhere else in your application that could be holding the class agent for that form class open in your system?

Cheers,
BeeJay.

JohnP
Posts: 73
Joined: Mon Sep 28, 2009 8:41 am
Location: Christchurch

Re: JADE Painter - form is in use?

Postby JohnP » Thu Apr 06, 2017 6:56 pm

BeeJay, when I tested it, it didn't matter if I deleted the form object or not (the one I created and "show"ed), the Painter still complained until the app went away.

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: JADE Painter - form is in use?

Postby BeeJay » Fri Apr 07, 2017 8:58 am

Most intriguing. I wonder what is different in your setup and the OP's setup vs our setup?!?

95% of the time simply closing the forms in the running app is enough and only very occasionally do we need the entire app to be closed in order to free up the class agent so we can save the form in painter.

I do have to admit that we were on 7.1 in our development environment only for the shortest of times, and upgraded to Jade2016 as soon as it was available. I just did a quick test on our older 7.1 development environment and have been unable to find a sequence whereby I can't save the form that was just closed in the running app.

Cheers,
BeeJay.

mjagers
Posts: 17
Joined: Wed Sep 22, 2010 5:22 pm

Re: JADE Painter - form is in use?

Postby mjagers » Fri Apr 07, 2017 9:04 am

I have always found that if the form is unloaded then using the Painter to modify and save the form works fine, regardless of the JADE release. We typically don't have to close down the application in order to be able to use the painter.
The application concerned must have an instance in-use somehow, perhaps one that hasn't been shown?

JohnP
Posts: 73
Joined: Mon Sep 28, 2009 8:41 am
Location: Christchurch

Re: JADE Painter - form is in use?

Postby JohnP » Fri Apr 07, 2017 11:38 am

I just used a JadeScript for the test. When I try it with a real application, I don't have to wait for the app to exit. The 5 second delay is to allow me to close the form before it gets deleted. After the 10 second delay expires, I can edit the form.

create myMainForm transient;
myMainForm.show;
app.doWindowEvents(5000);
delete myMainForm;
app.doWindowEvents(10000);

Maybe this is a case where a gui object is not deleted until the app goes into the JADE idle loop (ie, no methods on the execution stack). app.doWindowsEvents doesn't allow the actual delete to happen, but the idle loop does. The "real application" I tested normally sits in the idle loop, waiting for window events, notifications, etc.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 22 guests

cron