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

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



Hi,

When you typecast this.application() to WOApplication, you can only call the
methods declared in WOApplication. Try to typecast to Application. and
declare your "currentApp" attribute to "Application" as well. 

Good luck

Obul
----------
>From: "Anupindi, Ravikiran" <ravikiran.anupindi@ncmi.com>
>To: Multiple recipients of list <webobjects@omnigroup.com>
>Subject: WO40: Unable to access application level functions..
>Date: Wed, Jan 6, 1999, 7:48 PM
>

>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
>
>