Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh of grid sometimes fails
Message
From
26/03/2021 19:49:43
 
 
To
26/03/2021 17:22:16
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677764
Message ID:
01679308
Views:
54
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform