Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter clear
Message
De
16/10/2004 17:45:33
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
16/10/2004 14:40:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00951906
Message ID:
00952009
Vues:
13
>Yup, I'd say you've proved the point.
>
>However, see what you get when you try the following:
>
LOCAL loObject
>loObject = CREATEOBJECT("Custom")
>AddProperty(m.loObject,"icName")
>m.loObject.icName = "Jim Nelson"
>
>CREATE CURSOR c_SomeCursor (cField1 c(10))
>INSERT INTO c_SomeCursor (cField1) VALUES ("Jim Nelson")
>INSERT INTO c_SomeCursor (cField1) VALUES ("Mike Yearwood")
>
>xx = m.loObject.icName
>SET FILTER TO cField1 = m.xx
>BROWSE
>
>RELEASE m.loObject
>
>CLEAR
>DISPLAY MEMORY LIKE loObject
>WAIT WINDOW "Hold down the shift key to see that the object is really gone."
>
>*Do a record movement and it will crash.
>GO TOP && BROWSE etc.
>
>
>Now I personally do not believe that the behaviour of RELEASE in this case is proper, but it is the way it is.
>

What's improper? The value of the object's propery is copied to m.xx which is used in the filter. Did you expect m.xx to keep the object in existence?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform