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:
Divers
Thread ID:
00534387
Message ID:
00534390
Vues:
9
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.com
ICQ #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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform