[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WO40: Unable to access application level functions..



Now you should know better...

Cast to the 'Application' class

        Application currentApp = (Application)this.application(); 
         currentApp.xyz();



"Anupindi, Ravikiran" wrote:
> 
> This may be a simple question but, I am having problem accessing application
> level functions.
> 
> I have a function  'public void xyz()' defined in Application.java file. And
> I am trying to call this function from a different java class (abc.java). I
> am getting a message saying "Error:Method xyz() not found in class
> com.apple.yellow.webobjects.WOApplication"
> 
> We are using WO40 and java. The following is the code in my  abc.java file
> (same code worked with WO3.5.1):
> 
> public void foo() {
> 
>         WOApplication currentApp = (WOApplication)this.application();
> 
>         currentApp.xyz();
> }
> 
> Any ideas why this is happening ?
> 
> Thanks,
> Ravi
> ravikiran.anupindi@ncmi.com