>I hate to bother you about this again, but I'm having problems getting your code example to run. I'm not much when it comes to object oriented programming, I just know enough to get by in FoxPro and avoid it like the plague.
>
>I assumed the code segments (except for the last segment) belonged in a class, so I put all the code (again, except for the last segment) between:
>
> DEFINE CLASS Mutex AS Custom
> .
> .
> .
> ENDDEFINE
>
>Then I took the final code segment and built it into the code that I use to start my program. When I run it I get four errors, one right after another:
>
> Property cFormCaption is not found.
> Property hMutex is not found.
> Property nMutexError is not found.
> Property nMutexErr is not found.
>
>Then when I exit I get one more:
>
> Property hMutex is not found.
>
>
>Right inside this class definition is:
>
> WITH This
> .cFormCaption = lcFormCaption
> .hMutex = CreateMutex(0, lcInitOwner, @lcname)
> .nMutexError = GetLastError()
> ENDWITH
>
>So I don't know why it can't find these properties, aren't these properties supposed to be created with the previous statement? Or am I just clueless about OOP?
Hi Lance,
Check out the following posts I made recently. Rather than repeat the information I posted there (which should answer your question), you can use the following to locate them
Date Time Section Post Title Message #
8/5/99 12:50 Visual FoxPro in General One down all dead 250251
8/6/99 19:43 Visual FoxPro in General One down all dead 250977
The first post explains how it works, the second has code you can copy and paste to create the class. There's also a sample main program showing how to implement it.
If you have any more questions, just post back
George
Ubi caritas et amor, deus ibi est