Good morning.
I am not fully knowledgable of A5. So there might certainly be a way to easily access what I need, but not knowing this, have developed something, that if not there more readily, is something others might appreciate. But I need help getting it into the place that would be most helpful.
I try very diligently to use strict convention in the names of tables and fields within the the applications I am developing. But I do not have the memory and absolute consistency that allows for immediate recollection with complete assurance of table and field names as I am writing script. I desired to have a very quick reference to the table names and field names as I write script so this does not become an error place in the code I am writing. As I stated, there may be a very quick access to this that I am not aware of, but I do not know of it. So I wrote this code, that provides a dialog that displays the table names and the field names for selected tables as a reference. What I desire is to place this code as a toolbar item in the code editor toolbar, so a quick display of these are available to me as I am writing code. But I do not know which toolbar is for the code editor, nor whether it can be customized.
Does anyone know which toolbar is for the code editor, and whether it can be customized? And if not, an idea where this might be placed that would be of most help. Thank you.
I am not fully knowledgable of A5. So there might certainly be a way to easily access what I need, but not knowing this, have developed something, that if not there more readily, is something others might appreciate. But I need help getting it into the place that would be most helpful.
I try very diligently to use strict convention in the names of tables and fields within the the applications I am developing. But I do not have the memory and absolute consistency that allows for immediate recollection with complete assurance of table and field names as I am writing script. I desired to have a very quick reference to the table names and field names as I write script so this does not become an error place in the code I am writing. As I stated, there may be a very quick access to this that I am not aware of, but I do not know of it. So I wrote this code, that provides a dialog that displays the table names and the field names for selected tables as a reference. What I desire is to place this code as a toolbar item in the code editor toolbar, so a quick display of these are available to me as I am writing code. But I do not know which toolbar is for the code editor, nor whether it can be customized.
Does anyone know which toolbar is for the code editor, and whether it can be customized? And if not, an idea where this might be placed that would be of most help. Thank you.
Code:
FUNCTION Table_field_display AS C () 'Create an XDialog dialog box . dim vTM as C="" vTM = sortsubstr(a5.table_enum(),crlf()) dim vFM as C="" dim vfirst as c vfirst = word(vTM,1,crlf(),1) + "table" ' Generate the arrays dim vLTDIM as C dim vLTVAR as C dim vFilter as C dim vConv as C dim cycle as N = 0 for each foo in vTM vLTNow = foo.value vConv = alltrim(vLTNow) 'MSGBOX("CONV", vConv) vLTVar = vConv+"table" vLTDIM = "dim shared "+alltrim(vLTVar)+" as C" Evaluate_template(vLTDIM) eval(vLTVar) = table.external_field_name_get(vLTNow,"N") next '======== generate the xDialogs =================== RETRY: Gchoices = vTM vTables = word( Gchoices, 1, crlf() ) 'the district choices for default div. Itemchoices = eval(vfirst) dlg_text = <<%dlg% {position=4,1} {background=#165,190,185} {xmargin=2,2} {region} {font=Arial,9,b} {frame=1,0:Table Names} {font=Arial,9,n} [.30,30vtables^#Gchoices!newd_*] ; {endregion} {region}{comment this region is just to space things out a bit} {comment this adds even more space - maybe too much} {endregion} {region} {font=Arial,9,b}{frame=1,1:Field Names}{font=Arial,9,n} [.30,30vfields^#Itemchoices] ; {endregion} {condition=.t.} {lf}; {lf}; {line=1,0}; {lf}; {justify=center}<10OK> %dlg% dim vresults as C vresult=ui_dlg_box("Tables and Fields", dlg_text, <<%code% IF left( a_dlg_button, 5 ) = "newd_" IF a_dlg_button = "newd_change" Itemchoices = eval(alltrim(vtables)+"table") END IF a_dlg_button = "" END IF %code%) END FUNCTION
Comment