| Subject |
Re: calling part of .wfm from another .prg |
| From |
Milind Nighojkar <milinigh@yahoo.com> |
| Date |
Sun, 02 Jan 2022 11:15:00 -0500 |
| Newsgroups |
dbase.getting-started |
Thanks Bruce,
It worked with minor change. Insted of Parameter fm I used Public fm.
Can you explain me what is
if type("form") = "O"
Regards
Milind Nighojkar
Bruce Beacham Wrote:
> Pass a parameter when you call the method form_onOpen from another
> function, or another form's method.
> Then in the function form_onOpen you test for the type of the variable
> 'form'.
> If it is not known, then the parameter is the object (usually another
> form) which carries the properties you wish to retrieve. If it is
> known, then your alternative route is ignored.
>
> Thus:
>
> FUNCTION form_onOpen
>
> parameter fm // this will be a private variable.
>
> if type("form") = "O"
> fm = form
> endif
>
> nCol = fm.grid1.currentcolumn
>
> ....and so on.
>
>
> Bruce Beacham
>
> On 29/12/2021 17:39, 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?
> >
> > Milind Nighojkar
|
|