Home > Archive > Extreme Programming > August 2004 > Re: VB Lite Unit is now available on Sourceforge
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: VB Lite Unit is now available on Sourceforge
|
|
|
|
| Steve Jorgensen 2004-08-11, 3:57 pm |
| On Wed, 11 Aug 2004 14:21:02 GMT, "Phlip" <phlip_cpp@yahoo.com> wrote:
>Steve Jorgensen wrote:
>
>now
>
>D'oh!
>
>Can I trouble you for a vanilla example, or for a copy of the source inside
>the MDB file? I seem to have mis-laid my MS Access...
The example code is also inside the VB Project code, so you can either open it
in VB6, or you can open the files in the Modules subdirectory of the source,
and paste the code into VBA in MS Word, Excel, or whatever office 2K or above
app. you happen to have.
Look at the class (*.cls) modules named beginning with tcls...
| |
|
| Steve Jorgensen wrote:
> The example code is also inside the VB Project code, so you can either
open it
> in VB6, or you can open the files in the Modules subdirectory of the
source,
> and paste the code into VBA in MS Word, Excel, or whatever office 2K or
above
> app. you happen to have.
>
> Look at the class (*.cls) modules named beginning with tcls...
I have almost a decade of experience with Visual Basic, including VBA, and
it still kicks my ass.
I referenced your DLL, and cloned your test into my (VBA) project. In this
method...
Private Function ITestCase_TestCaseInstance() As ITestCase
Dim objResult As New tclsTestCaseTester
' Test for cut/paste error - programmer forgot to change type of
objResult.
Debug.Assert TypeName(objResult) = TypeName(Me)
Set ITestCase_TestCaseInstance = objResult
End Function
....the line 'Dim objResult' sez "User-defined type not defined".
Don'tcha love it?
--
Phlip
http://industrialxp.org/community/b...tUserInterfaces
| |
| Steve Jorgensen 2004-08-12, 3:58 am |
| On Wed, 11 Aug 2004 21:13:55 GMT, "Phlip" <phlip_cpp@yahoo.com> wrote:
>Steve Jorgensen wrote:
>
>open it
>source,
>above
>
>I have almost a decade of experience with Visual Basic, including VBA, and
>it still kicks my ass.
>
>I referenced your DLL, and cloned your test into my (VBA) project. In this
>method...
>
>Private Function ITestCase_TestCaseInstance() As ITestCase
> Dim objResult As New tclsTestCaseTester
> ' Test for cut/paste error - programmer forgot to change type of
>objResult.
> Debug.Assert TypeName(objResult) = TypeName(Me)
> Set ITestCase_TestCaseInstance = objResult
>End Function
>
>...the line 'Dim objResult' sez "User-defined type not defined".
>
>Don'tcha love it?
Note that tclsTestCaseTester is supposed to be the name of the class itself
since the function is used to generate instances of the class itself so that
each test can be run in its own instance.
Until you change the name of the class to tclsTestCaseTester or replace
tclsTestCaseTester with the name of your class, it won't compile. I'm
guessing that's the problem you are having.
By the way, thanks for helping me see what people will run into when trying to
use this code. It's most helpful.
|
|
|
|
|