// Use DataTest.pkg // Full scanning of table, UI Use App.utl Use DataTest.utl // Full scanning of table /DataTest.Hdr ÚÄ____________________________________________________________Ä¿ ³ ³ /DataTest.Frm1 ³ Read data by: ___ Recnum ³ ³ ___ Find by discrete recnum values ³ ³ ___ First unique index (primary index) ³ ³ ___ All indices ³ ³ ³ /DataTest.Frm2 ³ Lock: ___ No lock ___ Lock ³ ³ ³ /DataTest.Frm3 ³ User interrupt: Check keyboard every ___. records ³ ³ ³ ³ Screen update: Update screen every ___. records ³ ³ ³ ³ Max errors: Report a maximum of __. errors per table ³ ³ ³ /DataTest.Btn ³ _____________ _____________ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ /* object oDataTestPropertyPanel is a app.ModalClient DataTest.hdr on_key ksave_record send ok on_key kcancel send cancel set location to 3 7 absolute set window_color item 0 to 2 object oFrm1 is a Form DataTest.Frm1 set select_mode to AUTO_SELECT set location to 2 0 relative on_key knext_item send switch item_list on_item "" send none set checkbox_item_state to true set aux_value to DTPL_INDEX_RECNUM set select_state to true on_item "" send none set checkbox_item_state to true set aux_value to DTPL_INDEX_RECNUM_DISCRETE on_item "" send none set checkbox_item_state to true set aux_value to DTPL_INDEX_PRIMARY on_item "" send none set checkbox_item_state to true set aux_value to DTPL_INDEX_ALL_INDICES end_item_list procedure set piScanOrdering integer liVal local integer liMax liItm get item_count to liMax decrement liMax for liItm from 0 to liMax if (integer(aux_value(self,liItm))=liVal) set current_item to liItm loop end_procedure function piScanOrdering returns integer function_return (aux_value(self,current_item(self))) end_function end_object object oFrm2 is a Form DataTest.Frm2 set select_mode to AUTO_SELECT set location to 7 0 relative on_key knext_item send switch item_list on_item "" send next set checkbox_item_state to true set select_state to true on_item "" send next set checkbox_item_state to true end_item_list end_object object oFrm3 is a Form DataTest.Frm3 set location to 9 0 relative item_list on_item "1000" send next on_item "1000" send next on_item "99" send next end_item_list end_object object oBtn is a app.Button DataTest.Btn set location to 15 0 relative item_list on_item t.btn.ok send ok on_item t.btn.cancel send cancel end_item_list end_object function iPopup.sii string lsCaption integer liSetupObj integer liAllowAllIndices returns integer local integer liRVal set value item 0 to (lsCaption+"ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ") set shadow_state of (oFrm1(self)) item 3 to (not(liAllowAllIndices)) if liSetupObj begin set piScanOrdering of (oFrm1(self)) to (value(liSetupObj,DTPL_USE_INDEX)) set current_item of (oFrm2(self)) to (integer(value(liSetupObj,DTPL_LOCK))) set value of (oFrm3(self)) item 0 to (value(liSetupObj,DTPL_INTERRUPT_CHK)) set value of (oFrm3(self)) item 1 to (value(liSetupObj,DTPL_SCREEN_UPD)) set value of (oFrm3(self)) item 2 to (value(liSetupObj,DTPL_MAX_ERRORS)) end ui_accept self to liRVal if liRval eq msg_ok begin ifnot liSetupObj begin // if a cDataTestProperties object wasn't passed, we create one: object oDataTestProperties is a cDataTestProperties no_image move self to liSetupObj end_object end set value of liSetupObj item DTPL_USE_INDEX to (piScanOrdering(oFrm1(self))) set value of liSetupObj item DTPL_LOCK to (current_item(oFrm2(self))) set value of liSetupObj item DTPL_INTERRUPT_CHK to (value(oFrm3(self),0)) set value of liSetupObj item DTPL_SCREEN_UPD to (value(oFrm3(self),1)) set value of liSetupObj item DTPL_MAX_ERRORS to (value(oFrm3(self),2)) function_return liSetupObj end function_return 0 end_function end_object // oDataTestPropertyPanel // Check that data in tables can be read // This function takes an object ID of class cDataTestProperties (or // optionally 0) and returns the result in the same object (or optionally // creates a new object). If user cancels the dialog, zero is returned. function iDataTest_SetProperties global string lsCaption integer liSetupObj integer liAllowAllIndices returns integer function_return (iPopup.sii(oDataTestPropertyPanel(self),lsCaption,liSetupObj,liAllowAllIndices)) end_function