Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ACCESS method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
ACCESS method
Divers
Thread ID:
00534387
Message ID:
00534387
Vues:
31
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
red

Rodney E. Dixon
Mckee Foods Corporation
Collegedale, TN
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform