Re: VFP8 Form name changes upon compliation by kate
kate
Wed Dec 03 06:21:36 CST 2003
Thanks, Gene, that has provided a work-around for my problem. I've not
had any problems working with formsets before version 8 and I like the
readability of directly naming the object so I would still like to
find the reason for this.
Gene V <g_V_i_t_a_lat@sorry.com> wrote in message news:<eOdKjWBuDHA.556@TK2MSFTNGP11.phx.gbl>...
> It has been well accepted practice in the VFP community to NOT use
> formsets. They have a lot of quirks to try and work around, it is a much
> better practice to use modeless forms IMO.
>
>
> To make your toolbar button more abstract try and use the forms
> collection instead that way you won't have to worry about the form name.
> Just check to make sure the form has the method/property/control you
> want to invoke.
>
> I split these lines up to avoide word wrap :)
>
> IF TYPE('_screen.ActiveForm') ="O"
> IF PEMSTATUS(_screen.ActiveForm, "SomeformObject", 5)
> ? _screen.ActiveForm.SomeformObject.name
> ? _screen.ActiveForm.ActiveControl
> ENDIF
> ENDIF
>
>
> HTH....
>
> Kate wrote:
> > I have created a formset called FormSet1 which contains just one form
> > at the moment with a Pageframe on it. I have named the form 'frmMain'.
> > However I cannot reference any objects on the form from my toolbar
> > because it says 'unknown reference frmMain'. The following message was
> > displayed when I had an error on one of the pages - "...... in Program
> > Formset1._13V1BUQUS.Pageframe1.pgClient" which shows that the name of
> > my form has been changed to a generated one upon compilation as this
> > differs each time I recompile.
> >
> > How do I make it use my name, frmMain?
> >
> > Thanks
> > Kate