Subject Re: calling part of .wfm from another .prg
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Wed, 29 Dec 2021 10:24:51 -0800
Newsgroups dbase.getting-started

On 12/29/2021 9:39 AM, Milind Nighojkar wrote:
> Scenerio:
> There are few .wfm statements in    function GRID1_onOpen()
> nCol = form.grid1.currentcolumn
> m_COL_name = 'COLUMN'+ltrim(rtrim(str(1)))
>
> Want to call these 2 statements from external .prg say temp.prg
>
> Issue seen
> When temp.prg is called in  function GRID1_onOpen() get error message saying 'variable form not defined'
>
> Any suggestions?

This would be correct. "Form" is an internal reference for the form
object and the program would have no idea what it is (this is part of
the concept of encapsulation).

What do you need "temp.prg" to do?

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm