{-- *************************************************************************** -- ** Descr. : A simple script that loops through all Forms Items and looks -- ** for checkboxes that are too small and might not render nicely when -- ** deployed over the internet. -- *************************************************************************** -- ** 03/12/01 1.001.00 Initial Creation, muellers@orcl-toolbox.com -- ** 28/12/01 1.002.00 replace legacy code with new formsapi helper functions, muellers@orcl-toolbox.com -- ** 05/05/16 1.003.00 use log instead of file & modernization , muellers@orcl-toolbox.com -- ***************************************************************************} DECLARE ps TParamScreen; pb TParamBoard; i,j number; frm number; filename varchar2; files tstringlist; items tstringlist; BEGIN ps := TParamScreen.create; pb := ps.AddBoard('Find too small checkboxes',picOptions); pb.addparam(parLabel,'MYLABEL','Please select the source directory of the modules that you wish to analyze for too small checkboxes:','',''); pb.addparam(parPathname,'SRCDIR','Source Directory','d:\formsmodules\',''); pb.addparam(parLabel,'MYDBLAB','Database Connection to use (optional):','',''); pb.addparam(parDatabaseLogon,'DB','Database','',''); if ps.ShowParamScreen('') then begin //get list of files to process in the source directory (including subdirectories) files := GetFileList(ps.paramvalue('SRCDIR') ,'*.fmb', true); //connect to database (optional, speeds up loading of modules slightly) if ps.paramvalue('DB')<>'' then api_connect( ps.paramvalue('DB') ); logadd('found ' || files.count || ' files to process in '|| ps.paramvalue('SRCDIR') ||'!' ); for i := 0 to files.count-1 do begin try filename := files[i]; logadd('processing (' || (i+1) || '/' || files.count || ') - ' || filename ); frm := api_loadmodule(filename); items := api_getallitemObjects(frm); for j := 0 to items.count-1 do begin if generic_GetNumProp(items.objects[j], D2FP_ITM_TYP) = D2FC_ITTY_CB then if generic_GetNumProp(items.objects[j], D2FP_width) < 222 then begin logadd( ' => ' || api_GetObjectPath(items.objects[j], true)+ ' checkbox is ' || generic_GetNumProp(items.objects[j], D2FP_width) || 'px !' ); end; end; items.free; api_destroymodule(frm); except logadd(' => Error processing '+filename,logerror); end; end; files.free; end else begin logadd('pressed cancel button on parameterscreen!'); end; ps.free; END