************************************************** *-- Class: cifviewcombobox (c:\cdbk30\common30\libs\ccustctl.vcx) *-- ParentClass: cifcombobox (c:\cdbk30\common30\libs\ccustctl.vcx) *-- BaseClass: combobox *-- a specialized cifcombobox using views * #INCLUDE "c:\cdbk30\common30\include\framincl.h" * DEFINE CLASS cifviewcombobox AS cifcombobox RowSourceType = 2 Name = "cifviewcombobox" PROCEDURE Init LOCAL lcTag lcTag = ALLTRIM(this.cTag) *-- overwrite the default CifComboBox code to take my changes *-- into account *-- Validate the tag IF !IsTag(this.cTag, this.cAlias) this.lInitialized = .F. WAIT WINDOW NOWAIT TAGNOTFOUND_LOC + CHR(13) + lcTag ENDIF this.requery() NODEFAULT ENDPROC PROCEDURE Requery LOCAL lnOldSel lnOldSel = SELECT() SELECT (this.rowSource) REQUERY() SELECT (lnOldSel) ENDPROC PROCEDURE copyright *---------------------- Location Section ---------------------- * Library...........: * Class.............: Cifviewcombobox * Method............: *-------------------------- Copyright ------------------------- * Author............: José Constant * Project...........: PROSAL * Created...........: 17/03/98 14:17:39 * Copyright.........: (c) Terre-Engineering S.A. , 1998 *----------------------- Usage Section ------------------------ *) Description.......: This is a specialized cifComboBox * : It's based on a view * Scope.............: * Parameters........: *$ Usage.............: *% Example...........: * Returns...........: *------------------- Maintenance Section ---------------------- *@ Inputs:...........: * Outputs...........: * Pre-condt. invar..: Be sure to fill in the following properties * : BoundColumn: the select order of the unique id field in the view (ex: 1) * : cAlias: the view name, with "r" or "v" removed (ex: "v_Dojo" * : cField: the name of the field you want to display in the combo when closed * : (ex: " cClubNo") * : cTag: the name of the index tag that will be used for the lookup (ex: "ClubNo") * : YOU MUST INDEX THE VIEW AND CTAG MUST BE THE CURRENT ORDER! * Post-condt.invar..: *? Notes.............: None * Collab.methods....: None *--Process...........: * Change log........: *-------------------------------------------------------------- ENDPROC ENDDEFINE * *-- EndDefine: cifviewcombobox **************************************************