Information générale
Catégorie:
Programmation Orientée Object
>Hi to all
>
>We have a form based on a class that takes 8 seconds (!!!) only to load and show all the visual components it has (without loading ANY data linked to the controls). The form has a pageframe with 11 pages inside ... shall it be the cause?
Probably.
>Is there a way to speed-up this?
Yep... take all the controls off each page and save it as a class. Set up a UIenabler class... basically a label field... that is invisible. The class will have code in the uienable method simmilar to...
if lenable and vartype(this.parent.oPage2Class) <> "O"
this.parent.addobject('oPageClass',this.parent.cPage2class)
endif
This requires you adding the page class properties to your pageframeclass. OR, you can create a single property in your page from class that holds an array.
aPageClass ... the arrary would hold 3 properties that you can populate in init of the page... sort of like...
#DEFINE PAGENO 1
#DEFINE DISPCLASS 2
#DEFINE CLASSREF 3
dimension aPageClass[10, 3]
aPageClass[1, PAGENO] = 2
aPageClass[1, DISPCLASS] = 'Page2Class'
....
Then just modify the code above to use the array. You can get the page number from the activepage number from the page frame. That would make this a generic class.
You could even set up uour page frame to an a UIEnabler to every page of the pager frame other than page 1.
>Is it logic for a form based on a class to take more time to run than a form designed directly (without passing by a class)? (We work with 96MB and Pentium II-266MHz - based workstations, under Windows NT)
>
No... it shouldn't make a difference.
>Thanks for your answers and help.
BOb
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement