home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / ib / setups / intrabld / data.z / SELECT.CC < prev    next >
Text File  |  1996-12-11  |  1KB  |  30 lines

  1. /****************************************************************************\
  2. *                                                                            *
  3. * Select.cc  --  Generic IntraBuilder Custom Controls                        *
  4. *                (used by the TMD project)                                   *
  5. *                                                                            *
  6. *                                                                            *
  7. * Updated 9/18/96 by IntraBuilder Publications Group                         *
  8. * $Revision:   1.0  $                                                        *
  9. *                                                                            *
  10. * Copyright (c) 1996, Borland International, Inc. All rights reserved.       *
  11. *                                                                            *
  12. \****************************************************************************/
  13. class FieldSelect(FormObj) extends Select(FormObj) custom {
  14.    this.rowset = null;  // Create new custom properties
  15.    this.field  = "";
  16.  
  17.    function onServerLoad()
  18.    {
  19.      if ( this.rowset != null ) {
  20.        this.aOptions = new Array();
  21.        this.rowset.first();
  22.        while ( !this.rowset.endOfSet ) {
  23.          this.aOptions.add( this.rowset.fields[ this.field ].value );
  24.          this.rowset.next();
  25.        }
  26.        this.options = "array this.aOptions";
  27.      }
  28.    }
  29. }
  30.