I know I'm still locked into my old VB.Classic mind set, but how should you code for array properties in a class?
In VB I would do something like this:-
Dim mstrContactName(100)as string
Public Property Get strContactName(ByVal lngIndex As Long) As String
strContactName = mstrContactName(lngIndex)
End Property
Private Property Let strContactName(ByVal lngIndex As Long, ByVal strNew As String)
mstrContactName(lngIndex) = strNew
End Property
But in Gambas you can't pass variables to a Property. So I have to result to using a method like this:-
PUBLIC FUNCTION GetContactName(lngIndex AS Long) AS String
RETURN strContact[lngIndex]
END
PUBLIC FUNCTION LetContactName(lngIndex AS Long, strNew as String) AS String
strContact[lngIndex] = strNew
END
So my question: Is there a better way?