Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exposing the Name property of a SESSION object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00635065
Message ID:
00635340
Vues:
18
Mike,

The only thing I can do is confirm that VFP is hiding the native PEMs of the session class in this case. This behavior is in fact documented in the help file:

When the Session object represents a COM Server, all intrinsic properties are treated as private. (Look JimN something is properly documented *gdrvf*)

VFP doesn't do this for other classes like Custom.

Typically you want to hide the native properties in a COM to simplify it's interface to make it lighterweight, and VFP is just doing this automatically for you in the Session class. In general I try to avoid using native properties like this anyways I'd use something like cSessionName if I were doing this.

I think you are looking at a rework of your existing codebase.


>Funny thing... Your code works for me as well, it sees to come into play when I build a .dll. Try making a .PRG with this code and add it to a new project file called Test.
>
>DEFINE CLASS SessionSubClass As Session OLEPUBLIC
> Name="SessionSubClass"
>ENDDEFINE
>
>
>Build an MTDLL and try this from the command line:
>
>
>oX=CREATEOBJECT('Test.SessionSubClass')
>?oX.name
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform