Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Gridhighlighter Invalid dynamic forecolour - problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00770867
Message ID:
00771496
Vues:
13
>Elmer may be right, if it happens on form closing. Maybe because of the changes in ZOrder of the form controls GHL gets destroyed before the grid. Then, when grid tries to evaluate the Dynamic... properties one last time, GHL is already not there and GHL.nRecno property (that Dynamic.. expression checks) also is gone already, which causes Invalid Dynamic expression... error.
>
>GHL itself has the code in Destroy method that checks for the grid existence and resets the Dynamic properties to nothing. But if the object destruction happens in the reverse order, the Dynamic expression may point to non-existent GHL control property.
>

If you have such code, then the whole situation doesn't make much sense. Only if we suspect partial descruction of GHL, then grid destruction, then finishing with GHL. Weird indeed. It would be good to have an easy reproducable scenario. Did you try to create a form, add GHL first, then the grid? Would you have this problem?

>Colin may want to check if there is any code in the form that might change ZOrder of the form objects at runtime.

>I will see what is possible to do about that. Since GHL is Custom object, it does not have ZOrder method. Maybe it will make sense to base GHL on the visibe object (say, Line, with .Visible = .f.) and include the call to ZOrder(0) to HighLight_Row() method. Provided I can reproduce the situation. It might be also the internal grid problem.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform