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:
00927245
Vues:
29
Or even:
obj = CreateObject("myclass")
? obj.getHwindow()
* obj.hwindow=0  && generates an error
* ? obj.hwindow  && generates an error

DEFINE CLASS myclass As Custom
PROTECTED _hwindow

PROCEDURE Init
	DECLARE INTEGER GetFocus IN user32
	THIS._hwindow=GetFocus()
ENDPROC

PROCEDURE getHwindow
	RETURN THIS._hwindow
ENDPROC

ENDDEFINE
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform