Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assign UDF to documentFile property on an oleControl
Message
 
 
To
08/07/1998 16:05:53
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00114635
Message ID:
00115500
Views:
17
>Anything you issue within the class definition gets compiled; compiled methods will fire when their time comes, but properties are evaluated at compile time, and you'll get their values at compile time, and they won't be reevaluated at instantiation time. This means it'll use the GetFile() you give it when you compile, and it won't ask you for another when it instantiates.

Dragan,

Not quite, the property is evaluated at the time the first object of that class is instantiated. All other instances will get the same value as the first. There is a rather length section on this topic in the ProsTalk VFP OOP book I wrote.

But you are correct in that properties that should have temporal values based on instantiation time must be done in code in Init(), they can not be set on the property sheet.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform