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


> >
> > Hi Barry,
> >
> > "oApp" or "goApp" are typical names of custom, self-made "global application objects", so I'd probably use Vfp's "Code References" tool (in the "Tools" menu) to find out what (custom) form or class code is referring to that name.
> >
> > hth
> > -Stefan
>
> 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

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