• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Methods in Application Class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Methods in Application Class


  • Subject: Re: Methods in Application Class
  • From: Chris Pavicich <email@hidden>
  • Date: Sun, 1 Aug 2004 00:01:40 -0400

You should be able to do the following:

((Application)WOApplication.application()).yourMethod();

I am making the assumption here that your subclass of WOApplication is called Application,
as is generally the norm.



see: http://developer.apple.com/documentation/WebObjects/Reference/API/com/ webobjects/appserver/WOComponent.html
or: http://developer.apple.com/documentation/WebObjects/Reference/API/com/ webobjects/appserver/WOApplication.html


--CMP

btw, an example of what you wrote would be really helpful...


On Jul 31, 2004, at 23:17, email@hidden wrote:

I have written a method in the application class and I would like to call is
from other components (such as session).


I have tried a few ways but have had no luck in getting the code to build.
Since I am new to WebObjects and Java programming, I am not getting the correct
syntax. What is the syntax for calling a method that I created?


FYI - the method is called in the application class and works perfectly. I
just want to call it from other parts of my application.


Thanks.........Sandy
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Methods in Application Class (From: email@hidden)

  • Prev by Date: Re: Methods in Application Class
  • Next by Date: Re: Lock nowait??
  • Previous by thread: Re: Methods in Application Class
  • Next by thread: Re: Lock nowait??
  • Index(es):
    • Date
    • Thread