Identifying all the non-deferred views / modal panels
<< Back
Deferring Views/DbViews/ModalPanels can improve start-up performance of your desktop app. The following
piece of code allows you to identify all the non-deferred views and panels easily. Insert the following code
at the beginning of the SRC file (below the Use DfAllEnt line), then compile and run your program. You shall then see a list of names of
the views/modal panels that are not deferred displayed in the Output window.
#COMMAND DEFERRED_VIEW1
Property Integer !1_obj 0
Function !1_Handle Returns Handle
Handle hoView
Get !1_Obj to hoView
If (hoView=0) Begin
Send Cursor_wait to (cursor_control(Self))
Gosub Create_!1
Get !1_Obj to hoView
Send Cursor_ready to (cursor_control(Self))
End
Function_Return hoView
End_Procedure
Procedure !1
Handle hoView
Get !1_Handle to hoView
Send Activate_View to hoView
End_Procedure
[Found ~Found] Begin
Create_!1:
Object !4_ZZ is a dfObject
End_Object
Object !4 !5 !6 !7 !8 !9
Set !1_obj to Self
#ENDCOMMAND
#Replace Deferred_View DEFERRED_VIEW1
Procedure End_Construct_Object For dfBaseToolPanel
Forward Send End_Construct_Object
If (Right(Uppercase(Name(Self)),3)<>"_CD") Showln "Dialog - " (Name(Self))
End_Procedure
Procedure End_Construct_Object For MDIDialog
Handle hPrevious
Forward Send End_Construct_Object
If (Right(Uppercase(Name(Self-1)),3)<>"_ZZ") Showln "View - " (Name(Self))
End_Procedure