Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh of grid sometimes fails
Message
De
05/04/2021 11:17:00
 
 
À
26/03/2021 19:49:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677764
Message ID:
01679499
Vues:
58
Hi Albert,

I still use VMP for a few systems. They are all pretty stable so I don't do much work in them but every now and then I have to get back into it.

>Hey Mike,
>
>No, not in touch with anyone as the only other one I knew who used VMP was you. And since the support website died some years back, I had no idea how to get any support (other than posting here for you to see).
>
>I think I have only one small change to source that was causing a crash - a few years back. That could get thrown in with any other changes.
>
>Albert
>
>>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.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform