Problem with forms they disapear

Questions and answers for designing and implementing forms in Servoy

Problem with forms they disapear

Postby DEK4 » Mon Jan 13, 2014 6:12 pm

Hello, I noted a problem with Servoy.

When my solution start I open a form with an tabPanel where I put all my forms.
I have the "start" form that contain the menu, when i start to open a lot of forms my principal Start form, and also others forms, disaper.
I can see it on the form list but when I open the principal form that contain panels with sub forms I can see only one blank screen.

Is there any way to block servoy to delete my forms? It happen also when i have an edited foundset connected to a form, it just disapear.

Any suggestion?

Can i refresh the form?

thanks
User avatar
DEK4
 
Posts: 111
Joined: Wed Oct 12, 2011 9:26 am

Re: Problem with forms they disapear

Postby DEK4 » Thu Jan 30, 2014 6:58 pm

UP
User avatar
DEK4
 
Posts: 111
Joined: Wed Oct 12, 2011 9:26 am

Re: Problem with forms they disapear

Postby david » Thu Jan 30, 2014 7:30 pm

Are you loading the same form more than once?
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Problem with forms they disapear

Postby DEK4 » Thu Jan 30, 2014 7:35 pm

No, every form is loaded one time only
User avatar
DEK4
 
Posts: 111
Joined: Wed Oct 12, 2011 9:26 am

Re: Problem with forms they disapear

Postby david » Thu Jan 30, 2014 7:50 pm

Break it down and add one form to the load process at a time. I'm willing to bet you somehow use the same form twice somewhere. Even if not, this process will narrow the issue down.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Problem with forms they disapear

Postby jcompagner » Mon Feb 03, 2014 11:12 am

If you open up a lot of forms that older forms that are not used for a while are unloaded
When you show them again they should just be reloaded again (onload called)

Servoy can't just keep all forms in memory that would kill the client or server.

You can control it a bit, but be careful with that, that is keeping a form reference to a global (array) variable. so scopes.globals.mykeptform = forms.myform;
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Problem with forms they disapear

Postby DEK4 » Mon Feb 03, 2014 1:20 pm

Thanks for answers.

jcompagner wrote:If you open up a lot of forms that older forms that are not used for a while are unloaded
When you show them again they should just be reloaded again (onload called)

Servoy can't just keep all forms in memory that would kill the client or server.

You can control it a bit, but be careful with that, that is keeping a form reference to a global (array) variable. so scopes.globals.mykeptform = forms.myform;


when servoy destroy my form is there any way to call any methods? onUnLoad or something similar that i can intercept?
User avatar
DEK4
 
Posts: 111
Joined: Wed Oct 12, 2011 9:26 am

Re: Problem with forms they disapear

Postby jcompagner » Mon Feb 03, 2014 2:18 pm

onUnload is called then yes.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Problem with forms they disapear

Postby DEK4 » Mon Feb 03, 2014 2:24 pm

so...if I do something like

Code: Select all
function onUnload(event) {
     return false
}


if I interrupt the unLoad function?
User avatar
DEK4
 
Posts: 111
Joined: Wed Oct 12, 2011 9:26 am

Re: Problem with forms they disapear

Postby jcompagner » Mon Feb 03, 2014 3:09 pm

no that will not work. Because onUnLoad is already processed when it is being destroyed.
in onUnload you could store state and that kind of stuff that you can reuse again in onLoad
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Forms

Who is online

Users browsing this forum: No registered users and 10 guests

cron