Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form array property vs many properties?
Message
From
04/02/2008 12:11:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01288030
Message ID:
01289106
Views:
22
>>>In your original suggestion should it be
>>>Thisform.AddProperty("oProp", NULL)
>>>
>>>instead of
>>>Thisform.AddProperty("oProp", "Empty")
>>>
>>>or it doesn't really matter?
>>Depending on the coding style
>>Thisform.AddProperty("oProp", createobject("Empty"))
>>might be more fitting
>
>I was thinking that this is really an overkill. I believe that the property should be initialized with NULL.

Depending on what you want. Thisform.AddProperty("oProp", "Empty") will be a string. Thisform.AddProperty("oProp", createobject("Empty")) will be an Empty object - a live object at that, which can be assigned properties, i.e. a full object of class Empty (sounds like a paradox, I know).

If you initialize it as a .null, I really don't know what type will it be - and VFP probably doesn't know either. I initialize a property to .null. if I plan to make it an object reference later, just as a matter of style, the .null. being some sort of intuitive value for "no object", just like "" means "no string".

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform