VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "PickKids"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

'Klasa pickKids
Implements Command
Private kds As Kids
Private lst As ListBox
Private sex As String
'-----
Public Sub init(sx As String, kidds As Kids, list As ListBox)
  Set kds = kidds
  sex = sx
  Set lst = list
End Sub
'-----
Private Sub loadList()
  'Umieść na liście wybranych zawodników
  Dim sw As Swimmer
  lst.Clear
  kds.setSex sex
  kds.moveFirst
  While kds.hasMoreElements
    Set sw = kds.nextElement
    lst.AddItem sw.getName
  Wend
End Sub
'-----
'Tutaj wykonywane jest polecenie
Private Sub Command_Execute()
  loadList
End Sub
