• 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: Setting url to launch after build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting url to launch after build


  • Subject: Re: Setting url to launch after build
  • From: Colin Clark <email@hidden>
  • Date: Thu, 1 Jul 2004 19:09:35 -0400

Hi Thomas,

To load the WOUnitTest runner page by default when the application starts up, you'll need to do two things:

1. Change the application's default request handler to the DirectAction request handler. One possible place to do this in your Application's constructor:
WORequestHandler daHandler = requestHandlerForKey(directActionRequestHandlerKey());
setDefaultRequestHandler(daHandler);


2. Next, you'll want to ensure that your default direct action returns the WOUnitTest runner action. This should be put into your DirectAction.defaultAction() method. The "uta" action is the WOUnitTest DA for accessing the "all tests" runner.
return performActionNamed("uta");

That's it. Obviously, you'll want to make sure you take this code out before deployment so your users don't automatically see the unit test runner page.


Realistically, you probably won't want to link to the WOUnitTest framework at all when you're building your application for deployment, since it isn't a great idea to leave in an action in that can allow users to run your unit tests on a deployed application!

I hope that helps,

Colin

On Thursday, July 1, 2004, at 06:03 PM, Thomas Lewis wrote:

I am trying out WOUnitTest with a project and would like to launch their direct action instead of the main page once the project is built. Does anyone now how this can be done? The url/browser launching seems to be done by the woapplication during startup. Thanks in advance.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Setting url to launch after build
      • From: Thomas Lewis <email@hidden>
References: 
 >Setting url to launch after build (From: Thomas Lewis <email@hidden>)

  • Prev by Date: Re: Any WWDC News
  • Next by Date: Re: Future of WebObjects?
  • Previous by thread: Setting url to launch after build
  • Next by thread: Re: Setting url to launch after build
  • Index(es):
    • Date
    • Thread