Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Q: read-only property, the shortest implementation?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00927230
Message ID:
00927583
Vues:
26
>Hi George,
>
>Of course, in any programming environment we use what we are given.
>
>This discussion appears to be quite useful for me, thanks to you, George and to Sergey.
>
>Before planning the interface I wanted to clear this issue of read-only properties for myself. Even if I finish with Get and Set methods, that's good to know.
>
>The GDI+ Image class in .Net has Width and Height properties. The LoadPicture function in FoxPro and VB returns an object with similarly read-only Width and Height properties. So this is quite general approach.
>
>My point was get know if such interface could be developed in FoxPro code. It seems there is no direct way though some roundabouts still exist.

Anatoliy,

First, thanks for your web site. I think you've contributed mightly to the community.

Second, I think that you're trying to do something that beyond the bounds of what the _Access and _Assign events were intended.

They're intended to work with public properties. In this instance, you're trying to make them work otherwise. IOW, by making them protected, you're trying to do something that they weren't intended to do.

By hiding it, and creating an interface to it, you accomplish what you want, plus you have the benefit of not having to worry about the internals.

Regards,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform