Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Q: read-only property, the shortest implementation?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00927230
Message ID:
00927245
Views:
31
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform