Hi,
I am trying to find a way in Servoy 3.5.8 to ‘unload’ a form.
I saw in an old post (http://forum.servoy.com/viewtopic.php?f=2&t=5964&hilit=unload+form) that it is not possible, but that was two or three years ago.
So I am wondering now if there is a way to do it in 3.5.8.
The reason I need to do it is that I have a bean that I need to ‘force’ a redraw on (the IT2Be Gantt Bean) once the user has changed some dates, as the beans refresh is currently not working exactly how I want it to.
I have the bean displayed on a tab in a tab-panel & have tried removing that tab and then putting it back (& clearing the history), but Servoy, very kindly , is cacheing the form and so it is not ‘unloading’, because when I show it again, the form onLoad event isn’t firing
(& the remove/clear history/add back all happens very quickly).
I know that there is some funky way using the object model in 4.1 it could probably be done, but I’m not 100% comfortable yet with migrating to 4.1 & I certainly have not got the hang of using the object model!
I hope someone can come up with a solution for me
Thanks,
Rafi
The solution is to upgrade to Servoy 4, where you can remove a form from the cache.
Paul
pbakker:
The solution is to upgrade to Servoy 4, where you can remove a form from the cache.Paul
Thanks Paul, but as I said, I’m not quite ready to do that yet.
Is there really no other way it can be done in 3.5.8?
Rafi
because when I show it again, the form onLoad event isn’t firing
And why can’t you use onShow with maybe some condition checking?
I don’t know what it is that you want to do but this should do it for you.
IT2Be:
And why can’t you use onShow with maybe some condition checking?
I don’t know what it is that you want to do but this should do it for you.
Hi Marcel,
I am doing an onShow, where I am calling the ‘refresh’ function of the bean, but as I have discussed with you, the changes I am making to foundset are not being reloaded/refreshed/updated into the bean. It only seems to do it when the bean is initialised on the onLoad method [basically I have worked out the VERY complex code to cascade thru the linked tasks updating the dates if an end date of a task with links is changed and wanted that to be shown straight away in the bean, but I can’t seem to get it to show]
e.g. task A end on 10/3/09 and is linked to task B with a FS link. task B starts on 10/3/09. If user changes task A to end on 15/3/09, I need to move task B to start on 15/3/09 and change it’s end date to match, and so on down all links. This should be shown graphically in the bean by all the linked tasks moving across. The data in the foundset is being updated, but the bean is not showing this. If I switch into design mode & back and reload the bean, it shows.
Thanks
Rafi
rafig:
pbakker:
The solution is to upgrade to Servoy 4, where you can remove a form from the cache.Paul
Thanks Paul, but as I said, I’m not quite ready to do that yet.
Is there really no other way it can be done in 3.5.8?Rafi
sorry, but no, no way to force a form out of memory in 3.5.x.
Paul
pbakker:
[sorry, but no, no way to force a form out of memory in 3.5.x.
Paul
Oh!
Maybe I can work something out with Marcel, otherwise we will have to go to 4…
Thanks,
Rafi
the changes I am making to foundset are not being reloaded/refreshed/updated into the bean
Yes, and as discussed (now I remember) this is something that is not in the API of Servoy. I don’t know that there are foundset changes.
As far as I know I have not yet released a version of the Bean that should react to the refresh method in a better way.
I hope to release that beginning next week…
IT2Be:
Yes, and as discussed (now I remember) this is something that is not in the API of Servoy. I don’t know that there are foundset changes.
As far as I know I have not yet released a version of the Bean that should react to the refresh method in a better way.
I hope to release that beginning next week…
That would be REALLY fantastic Marcel!
Thanks,
Rafi
Marcel,
would it help if I sent you an updated version of my (v3.5. solution with my new code in it?
Maybe I just don’t understand, but could you please explain in detail what exactly the
elements.it2be_gantt.refresh();
is meant to do? (it says it reloads & repaints everything…)
I am calling this in my onShow method that IS getting called after all my changes.
Thanks,
Rafi