Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using .SetAll()
Message
De
14/03/2008 12:36:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01302151
Message ID:
01302194
Vues:
10
Unfortunately, this approach won't work in my particular situation. The buttons are added to the page dynamicly based upon things which happen on other pages. There could be anywhere from 1 to N buttons which are displayed four buttons to a row with four rows in the display area. Each button has a Group_Number property which is assigned when the button is created (1-16 = 1, 17-32 = 2, etc.). The user does something which requires a different group of buttons to be displayed. So my (non-working) command was actually
.setAll('visible',group_number = lnGroup,'cmdSelect').
The looping structure in place actually works very well from a user's perspective. Screen refresh is (virtually) instantaneous. Decent hardware means optimizing code performance is important on a theoretical, not necessarily a practical, level.

I do appreciate the response. Thanks


>Rich,
>
>Maybe you can see the problem from another perspective where you do not need to use setAll atAll <g>
>
>You can create a method tag_assign in your myButtonClass
>
>
>procedure tag_assign(tcNewValue)
>
>this.tag = lower(m.tcNewValue)
>this.Visible = (this.tag = 'yes')
>
>
>This way whenever you change the tag property value to 'yes' the button will become visible (presumably you are doing this in 'some stuff') and you do not need the setAll call at all.
>
>>I have a page with a bunch of buttons on it. It want to set the Visible property to some condition based upon a property inside the button. Something like
>>WITH myForm.myPageFrame
>>  loPage = .pages(.activepage)
>>  WITH loPage
>>       do some stuff
>>       .setAll('visible',tag = 'yes','myButtonClass')
>>       more stuff
>>  ENDWITH
>>ENDWITH
>>
>>However, when the setAll() line is executed I get a "Variable 'Tag' is not found" error.
>>
>>I also tried .tag = 'yes' but the reference would be to the page's Tag, not but button's.
>>
>>I've gotten around this by looping through all the buttons but it feels cleaner to do it in the one statement. Is there some way to use setAll() and reference a property inside the objects being "set"?
>>
>>Thanks.........Rich
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform