Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird behavior
Message
De
02/06/2010 22:58:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01467159
Message ID:
01467161
Vues:
82
>Hi everybody,
>
>I have a pageframe with several pages. On the 3rd page there are 10 checkboxes. They all had almost identical code in their Init method
>
>that set its caption to a value of the field in preferences table.
>
>I decided, that having the practically identical code doesn't sound very OOP to me, so I moved the code into Page.Init and wrote a little FOR each loop.
>
>The Page.Init is executed, but the checkboxes have their original check1 caption and not the correct caption. I placed the original code into Init of the first checkbox and it came with the correct caption.
>
>Do you know why I may be having such weird behavior? Why setting caption in Init of the page doesn't work, but works in each control's init?
>
>Thanks in advance.
>
>UPDATE. Sorry, it was a programming mistake. I figured this out.

You can have an array of checkboxes. See my FAQ #8110 for several options.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform