Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird behavior
Message
From
02/06/2010 22:58:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01467159
Message ID:
01467161
Views:
78
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform