Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh of grid sometimes fails
Message
De
26/03/2021 17:22:16
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
12/01/2021 14:46:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677764
Message ID:
01679306
Vues:
62
Hey Albert

Are you in touch with any other MaxFrame user's? I think Mike Potjer still uses it. I wonder if we shouldn't ask Russ Swall if we can put VMP on GitHub.

I know I made a code change in one place in VMP, that was not made in another place, though it is exactly the same.

In xxsqlexe.prg is this code:
IF m.llSuccess
  * Initialize any passed parameters list
  IF (TYPE('m.taParms[1]') = 'C') AND (NOT ISNULL(m.taParms[1])) AND (NOT EMPTY(m.taParms[1]))
    LOCAL lcString, lcPName, yy
    FOR yy = 1 TO ALEN(taParms, 1)
      lcString = 'LOCAL ' + m.taParms[m.yy, 1]
      &lcString.
      lcName = m.taParms[m.yy, 1]
      STORE m.taParms[m.yy, 2] TO &lcName.
    ENDFOR
  ENDIF
ENDIF
which would be better as
IF m.llSuccess
  * Initialize any passed parameters list
  IF (TYPE('m.taParms[1]') = 'C') AND (NOT ISNULL(m.taParms[1])) AND (NOT EMPTY(m.taParms[1]))
  LOCAL yy
  FOR yy = 1 TO ALEN(taParms,1)
    LOCAL (taParms[m.yy,1])                      &&& declare the variable in taParms[yy,1]
    STORE (taParms[m.yy,2]) TO (taParms[m.yy,1])   &&& store the variable whose name is in taParms[yy,1] with the value in taParms[yy,2]
  ENDFOR
ENDIF
endif
That was only 1 of 3 things I ever taught Drew. :) He added the &&& comments.

>Okay, will give it a whirl. Better than banging my head against my code trying to find the problem.
>
>Thanks
>
>>>Hi Mike,
>>>
>>>No I am not - do you think in a situation where the cursor is nuked of all records and then rebuilt with entirely new records it is needed? When I looked at the code in .RealRefresh(), it seemed to be just positioning the record pointer before issuing .Refresh().
>>>
>>>Albert
>>>
>>>
>>>>Are you calling VMPs RealRefresh() instead of the native refresh?
>>
>>The reason Drew came up with it, was that grid's don't always refresh. I believe it's getting VFP to see things need to be refreshed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform