Hi!
You require to RETURN the value from Access method:
hidden procedure DebugDir_Access
if empty(this.DebugDir)
wait window 'DebugDir property has not been set'
endif
return this.DebugDir
endproc
HTH.
>The following is a class defintion:
>*
>define class MFCGlobal as Custom
> DebugDir = ""
> *
> hidden procedure DebugDir_Assign
> * Debug directories are always under C:\TEMP
> lparameters xNewVal
> *
> if type('xNewVal') <> 'C'
> wait window 'MFCGlobal:Invalid assignment, must be a character value'
> else
> xNewVal = alltrim(xNewVal)
> if right(xNewVal, 1) <> '\'
> xNewVal = xNewVal + '\'
> endif
> this.DebugDir = 'C:\TEMP\' + xNewVal
> if !Directory(this.DebugDir)
> md this.DebugDir
> endif
> endif
> endproc
>enddefine
>
>If I create an object based on this class and assign a value to the DebugDir property and then print it, it works great. Now the problem is when I add the following access method:
>
>hidden procedure DebugDir_Access
> if empty(this.DebugDir)
> wait window 'DebugDir property has not been set'
> endif
>endproc
>
>If I print the DebugDir property it prints out a logical value. When I go into debug mode, the propery within the object is set correctly, it just getting to that value outside of the object always returns a logical. Take the access method out and things go back to working again.
>
>ANY help would be greatly appreciated.
>
>Rodney E. Dixon
>McKee Foods Corporation
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.