Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is Nothing?
Message
De
19/12/1997 18:28:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00067288
Message ID:
00067330
Vues:
27
>>>>>Visual Basic has a word for an empty object, "NOTHING". What is the Visual FoxPro word for "NOTHING"? I have tried .NULL. and it does not work.
>>>>>
>>>>>Thanks in advance.
>>>>
>>>>Actually, VFP has three things to be checked by EMPTY(), ISNULL() and ISBLANK().
>>>
>>>Let me be more specific. The documentation for an activeX component called MapObjects says (in VB lingo): "To draw with a single symbol, set the Renderer property to Nothing. How do I set the Renderer property to Nothing in VFP?
>>
>>Now, it becomes difficult for me, because I don't use this ActiveX. I can just assume that NOTHING means 'kill this object' in VB-sense. VFP equivalent would be Object.Release and/or Container.Removeobject and/or Release Object.Renderer. Try, maybe something will work. BTW, I thought that NOTHING is applied not to property, but directly to VB-object
>
>The VB help for NOTHING says:
>
>"The Nothing keyword is used to disassociate an object variable from an actual object. Use the Set statement to assign Nothing to an object variable. For example:
>
>"Set MyObject.Renderer = Nothing
>
>"Several object variables can refer to the same actual object. When Nothing is assigned to an object variable, that variable no longer refers to an actual object. When several object variables refer to the same object, memory and system resources associated with the object to which the variables refer are released only after all of them have been set to Nothing, either explicitly using Set, or implicitly after the last object variable set to Nothing goes out of scope."
>
>I need an equivalent statement in VFP code.

Try one of the following:

MyObject.Renderer = .NULL.
MyObject.Renderer = 0
MyObject.Renderer = .F.

I'm pretty sure one of them will work.

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform