I have an browse class name TYK_List. I have an define line like above.
- Code: Select all Expand view RUN
- CLASS TYK_List FROM TYK_Core
DATA oData
DATA oDlg, oDlg_Other
DATA oParent
....
....
....
METHOD New( cVarName, cCerID, uData, aMyCols, aHeaders, cButtonPlace, SART, ARANAN, nOrd, aButtons, ;
aRelations, aOptions, Esas_Isim, Ex_SART, aCargo, cSilKontrol, cOnBody, aArama, oData, ;
lLineNo, cOnExtra_Caption, oApp, oFont_Brw, oFont_Edit, ldontExit, aStartUp, bOzelyetki, ;
bOnLocked, cOnLocked, lDesc, lMultiSelect, oWnd, oParent, cPrefix_Sil, aKaydet_Kontrol, ;
cTitle, cOnExtra_Bitmap, cIcon) CONSTRUCTOR
METHOD GO_DETAY_Ekle()
METHOD GO_DETAY()
METHOD GO_SIL()
METHOD GO_BUL()
....
....
....
METHOD End()
ENDCLASS
- Code: Select all Expand view RUN
- #xcommand DEFINE Ob_Browse1 <oOb_Brw> [OF <oWnd>];
[ CERCEVEID <cCerID> ] ;
[ UDATA <uData> ] ;
[ DATA <oData> ] ;
[ <cols: COLS, COLUMNS> <aMyCols,...> ] ;
[ <head:HEAD,HEADER,HEADERS> <aHeaders,...> ] ;
[ BUTTONYERI <cButtonPlace> ] ;
[ SART <cSART> ] ;
[ ARANAN <cARANAN> ] ;
[ ORDER <nOrd> ] ;
[ <buttons:BUTTON, BUTTONS> <aButtons,...> ] ;
[ <rela:RELATION, RELATIONS> <aRelations,...> ] ;
[ <opt:OPTION, OPTIONS> <aOptions,...> ] ;
[ ESASISIM <cEsas_Isim> ] ;
[ EXTRASART <Ex_SART> ] ;
[ CARGO <uCargo> ] ;
[ ONSILKONTROL <cSilKontrol> ] ;
[ ONBODY <cOnBody> ] ;
[ <aramavar: ARAMAVAR> <aAramaVar,...>] ;
[ <lineno: LINENO> ] ;
[ EXTRABUTTON CAPTION <Ex_BCaption> ] ;
[ EXTRABUTTON BITMAP <Ex_BBitmap> ] ;
[ TITLE <cTitle> ] ;
[ APPLICATION <oApplication> ] ;
[ BROWSE FONT <oFont_Brw> ];
[ EDIT FONT <oFont_Edit> ];
[ PARENT <oParent> ] ;
[ <ldontExit: DONTEXIT> ] ;
[ STARTUP <aStartUp>] ;
[ OZELYETKI <bOzelYetki>] ;
[ ONLOCKED <bOnLocked>] ;
[ ONLOCKED_VAR <cOnLocked>] ;
[ <lDesc: DESCENDING> ] ;
[ <lMulti: MULTISELECT> ] ;
[ PREFIX_SIL <cPrefix_Sil> ] ;
[ <KONTROL> <aKontrols,...> ] ;
=> ;
<oOb_Brw> := TYK_List():New(<(oOb_Brw)>, <cCerID>, <uData>, ;
[\{<aMyCols>\}],;
[\{<aHeaders>\}],;
[<cButtonPlace>],[<cSART>],[<cARANAN>],[<nOrd>],;
[<aButtons>],[\{<aRelations>\}],[<aOptions>],[<cEsas_Isim>],;
[<Ex_SART>],[<uCargo>],<cSilKontrol>,<cOnBody>,[<aAramaVar>], ;
<oData>, <.lineno.>, [<Ex_BCaption>], <oApplication>,;
[<oFont_Brw>], [<oFont_Edit>], <.ldontExit.>, <aStartUp>, <bOzelYetki>, ;
<bOnLocked>, <cOnLocked>, <.lDesc.>, <.lMulti.>, [<oWnd>], [<oParent>],;
[<cPrefix_Sil>], [\{<aKontrols>\}], [<cTitle>], [<Ex_BBitmap>] )
This class has a dialog and can be define more than one same class in it. There is no problem. It works.
If there is an error in one dialog that called from first class, I could not found the which derived object is from.
I have decided to separate class like This
- Code: Select all Expand view RUN
- CLASS TMy_Purpose1 FROM TYK_List
ENDCLASS
CLASS TMy_Purpose2 FROM TYK_List
ENDCLASS
CLASS TMy_Purpose3 FROM TYK_List
ENDCLASS
CLASS TMy_Purposen FROM TYK_List
ENDCLASS
In this situation, I can not use define "Ob_Browse1" name. I should define every inherited class "TMy_Purpose?". But This class is constantly changing, it also defines.
I should not forget to change inherited class defines also.
Question :
Is there any general define method (or parameter) to run inherited classes from one define line?
- Code: Select all Expand view RUN
- xcommand DEFINE oMy_Purpose1 oOb_Browse1 // but should run TMy_Purpose1() instead TYK_List()