Post by wwu on Sept 18, 2006 3:36:12 GMT -5
first, i'm really excite about your great VBCorLib, it is just a like a clean breeze in VB traditional programming, i believe it will be standard in VB6 world.
----------------------
but i still need some help
---------------------
here is test source
---------------------
Dim daughters As ArrayList
Set daughters = New ArrayList
daughters.Add "Jan"
daughters.Add "Cindi"
daughters.Insert 0, "Marsha"
daughters.Remove "Cindi"
daughters.Add "Cindy"
Debug.Print "Number of Daughters: "; daughters.Count
' output
' Number of Daughters: 3
Dim name As Variant
For Each name In daughters
Debug.Print "Name: "; name
Next name
' output
' Name: Marsha
' Name: Jan
' Name: Cindy
daughters.Sort
For Each name In daughters
Debug.Print "Name: "; name
Next name
' output
' Name: Cindy
' Name: Jan
' Name: Marsha
------------------------------
during execution , when hit such code
"For Each name In daughters"
vb6 IDE prompts me about Run-time error '91':
Object variable or With block variable not set,
then the debugger automatically paused at
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'ArrayListEnumerator.cls
' IEnumerator Interface
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Property Get IEnumerator_Current() As Variant
If mList.Version <> mVersion Then _
Throw Cor.NewInvalidOperationException(Environment.GetResourceString(InvalidOperation_VersionError))
If mIndex < mStartIndex Then _
Throw Cor.NewInvalidOperationException(Environment.GetResourceString(InvalidOperation_EnumNotStarted))
If mIndex > mEndIndex Then _
Throw Cor.NewInvalidOperationException(Environment.GetResourceString(InvalidOperation_EnumFinished))
Call Helper.MoveVariant(IEnumerator_Current, mList(mIndex))
End Property
stop at line "Call Helper.MoveVariant(IEnumerator_Current, mList(mIndex))"
IEnumerator_Current is empty , i don't know what exactly why?
I'm work in windows2000 + sp4, any advice?
i canot say it is pure vb bug, because, after i click End button in VB IDE, even IDE closed suddenly, I think it will be critical.
Thanks a lot, these days we will decide whether using this framework or not, i hope VbCorLib will be more robust, thanks for great framework;)
any advice will be appreciated!