Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid - AfterRowColChange
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00966222
Message ID:
00967362
Vues:
7
Hi Sergey,
I agree that it breaks the rule, but to go the 'correct' way we would need to add a custom method myAfterRowColChange to myGrid, and call it from the AfterRowColChange AND from wherever place the event should fire but it does not. The problem with this is that we will need to move ALL the code currently in AfterRowColChange of each grid on each form to the new myAfterRowColChange, then rebuild everything, missing some apps/forms/grids in the process...
So, what could be in this case the consequence of breaking the rule?
Thanks!

>Hi Doru,
>
>>The code I posted was just for the repro, I can put your code in our classes code where we formerly had toGrid.setfocus().
>>Our first work around was similar to what you came up with, but then we tested toGrid.afterRowColChange() and that seemed to do what we wanted - i.e. running the method code regardless of AllowCellSelection setting.
>>Do you see anything wrong with calling toGrid.afterRowColChange()?

>
>You're breaking the rule that methods should never call events. If you want to go this route than you should create a special custom method in your grid base class that does object refresh on a form and call it from AfterRowColChange and other place
>
>>PS Do you think I should do a bug report?
>
>Yes.
Doru
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform