Re: WOApplication.primeApplication() deprecated
Re: WOApplication.primeApplication() deprecated
- Subject: Re: WOApplication.primeApplication() deprecated
- From: Hsu <email@hidden>
- Date: Thu, 20 Nov 2003 22:11:40 -0800
1)
There is a bug in the documentation on
<url:http://developer.apple.com/documentation/WebObjects/Reference/
API/com/webobjects/appserver/
WOApplication.html#primeApplication(java.lang.String, java.lang.Strin
g, java.lang.String)>
public static void primeApplication(String mainBundleName,
String mainBundlePath,
String nameOfApplicationSubclass)
Should be
public static void primeApplication(String mainBundleName, URL
mainBundlePathURL, String nameOfApplicationSubclass)
2)
At the url above any of the primeApplication methods are marked as
deprecated.
Yes, this is a bug in the Doc. It looks like a cut/paste error.
3)
javac tells me that primeApplication(String, URL, String) also is
deprecated. This is on osx 10.3.1 with WO5.2.2 and ant 1.5.3.
[javac]
/Users/kajh/src/webobjects/nettskjema/src/NettskjemaTestCase.java:37:
warning:
primeApplication(java.lang.String,java.net.URL,java.lang.String) in
com.webobjects.appserver.WOApplication has been deprecated
[javac] WOApplication.primeApplication("", new URL(""),
"");
javac uses the same mechanism as javadoc to determine if something is
deprecated. You will just have to ignore this for now.
4)
Until now we have used
WOApplication.primeApplication(
NSBundle.mainBundle().bundlePath(), "Application");
in the setUp method of our junit testcases for WO apps.
NSBundle.mainBundle().bundlePath() is now deprecated, ref.
<url:http://developer.apple.com/documentation/WebObjects/Reference/
API/com/webobjects/foundation/NSBundle.html#bundlePath()>
What should we use instead in setUp?
Depends on what you are using it for now... WOApps should almost never
need to invoke this. Can you describe a bit more what you are using it
for now?
Karl
--
If at first you don't succeed, find out if the loser gets anything.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
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.