Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to populate a listbox
Message
 
À
13/01/2006 18:46:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01086295
Message ID:
01087663
Vues:
10
>I had to add this into the forms LOAD for it to work, did you omit this by accident? (I'm the one who makes accidents around here :) )
>
>thisform.ADDPROPERTY("acontents[1]")

>
>Oops, sorry about that. When I said that you should add an array property to the form, I sort of assumed that you would go to the form menu and add it visually in the form designer.
>
>Just goes to show us once again that assume makes an a** of u and me < g >.
>
>PS, what do you mean by array scope?
>
>If you do not specifically declare your arrays and variable as public or local, they are private in scope by default. What this means is that they can be "seen" be the method in which they declared and in any method the is called by that method. When the method in which the variable or array is declared ( or, rather, not declared explicitly ) ends, the variable or array goes out of scope - poof! It is gone.
>
>When you make the array a property of the form, it can been "seen" by any form method or object (provided that you create it as a public property). It is a much better solution than declaring them as public.

SCRATCH THAT LAST MESSAGE , I always figure it out after a post. I didn't refer to the property correctly with prefix thruout my code, I was missing "thisform.". :)
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform