Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barry Lupton
  Where is Barry Lupton?
 Coventry
 United Kingdom
 Barry Lupton
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Object OAPP is not found
Thread ID: 331273 Message ID: 331408 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Thursday, December 29, 2011 5:59:46 PM         
   


> >
> > Stefan, Anil, Rahul, Cecil
> >
> > Thanks to all of you for your help. Using Code Reference I found this piece of code:
> >
> > LPARAMETERS nStyle
> > IF !EMPTY( thisform.cToolBar )
> > oApp.ShowAppToolBar( thisform.cToolBar )
> > ENDIF
> >
> > derived from parent code (blfrmbase, blbasclas.vcx) in my form's Show procedure. blbasclas.vcx is in my home directory so why would it not be found?
> >
> > Barry
>
>
> That looks to me as if the problem is not that the blfrmbase class in blbasclas.vcx is not found but rather that the m.oApp object does not exist (yet) when that code runs, or that its existence is expected respectively.
> Did you create those parent class(es) yourself or someone else, is the m.oApp application object being used in your project at all?
>
> If you want to use that object, a typical place where such a global app object is being instantiated would be the project's "main.PRG" (or a PRG/procedure/method being called from there), IOW, as early as possible because of its importance.
>
> If you do not want to use it, the ParentClass code is "wrong" by expecting the existence of an oApp. (Aside from the fact that form.Show() is not always an event so that perhaps form.Activate() could be a better place IMO).
> So that you could either make its usage optional ("If VarType(m.oApp)=='O' ..."), or perhaps use a different ParentClass for that particular form.
>
> hth
> -Stefan

Hi Stefan, Thanks for pointing me in the right direction. I think I'm beginning to see the light. The oApp object looks as though it's something I did a long time ago. I've just got to work out how best to eliminate this piec of code. Have I inadvertently modified the base class provided with VFP?

Barry

ENTIRE THREAD

Object OAPP is not found Posted by Barry Lupton @ 12/28/2011 12:42:29 PM
RE: Object OAPP is not found Posted by Stefan Wuebbe @ 12/28/2011 1:12:41 PM
RE: Object OAPP is not found Posted by Barry Lupton @ 12/28/2011 9:28:53 PM
RE: Object OAPP is not found Posted by Stefan Wuebbe @ 12/28/2011 9:53:16 PM
RE: Object OAPP is not found Posted by Barry Lupton @ 12/29/2011 5:59:46 PM
RE: Object OAPP is not found Posted by Stefan Wuebbe @ 12/29/2011 8:01:09 PM
RE: Object OAPP is not found Posted by Barry Lupton @ 12/29/2011 11:26:06 PM
RE: Object OAPP is not found Posted by Cecil Champenois @ 12/28/2011 10:21:10 PM
RE: Object OAPP is not found Posted by Barry Lupton @ 12/29/2011 6:02:58 PM
RE: Object OAPP is not found Posted by Anil Sharma @ 12/28/2011 1:13:53 PM
RE: Object OAPP is not found Posted by Rahul Moudgill @ 12/28/2011 1:15:22 PM
RE: Object OAPP is not found Posted by Cecil Champenois @ 12/28/2011 2:00:18 PM