>>Hi everybody,
>>
>>I've just noticed, that our BaseForm class has thisform.refresh() in Form's Init in case, it sets a filter. I'm not sure, it's allowable to call form's refresh from Init, it breakes event sequence, it may cause lots of undesired effects, etc.
>>
>>For instance, I usually code Form's Init this way:
>>
>>my custom code
>>dodefault()
>>some other custom code
>>
>>Besides, as far as I know, first activation of the form calls its Refresh anyway.
>>
>>What would be your opinion?
>>
>>Thanks a lot in advance.
>
>Hi Nadya
>
>I agree with you that it's redundant, but is probably harmless. However, in order to apply a filter you do need to move the reocrd pointer, even if only to the same place, so maybe just replace the
>
>ThisForm. Refresh()
>
>with
>
>GOTO RECNO()
Hi Andy,
Immediatelly after SET FILTER command we have locate, so in my opinion it's enough. I called my colleague once I noticed this to ask her, why we have this command and could it cause us trouble, etc. She told that it's necessary to refresh a form after setting filter. While I disagree, I could not convince her, what she is not correct. I don't know, how important it is and should I try to convince everyone, that this line of code needs to be removed or just live with it. It doesn't seem to make any harm so far...
If it's not broken, fix it until it is.
My Blog