• 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: Moving Classes into a package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving Classes into a package


  • Subject: Re: Moving Classes into a package
  • From: John Larson <email@hidden>
  • Date: Tue, 12 Sep 2006 05:25:06 -0500


On Sep 11, 2006, at 11:20 PM, Don Lindsay wrote:

Hello All;

I have more information after playing with this all night. :)

Heck of a thing to think that all you're doing is responding to a one- line warning from Tomcat.



I can comment out all of the package clauses in my classes and the application functions.

Do you mean that you can comment out the package names, not change the EOModel, and everything works? I know you said that you changed the model in your first e-mail. If so, then you may have to refresh the model.


I put the package declarations back in and I get an error about two protected variables in my LoginPage (aFormKey, etc). All of the classes are part of the package so should have access to these protected variables. I do not get a stack trace from the application when it encounters this error. All I get is that a property aFormKey, _aFormKey, etc does not exist.


Yes, this is a subtle point. The framework doing the work isn't in the package that your classes are. It is in com.webobjects.something Therefore it can't access the fields or methods. This is one of the problems about not packaging - it let's you get away with thinking that everything is ok since it's working. But when you package it, then problems like this crop up. You have to use one of the methods Chuck passed along to get it to work. For the purposes of quickly getting past this problem, I would just put public in front of all the fields in your WO files that the wod references.


If I change the protected keyword to public then the application will load, but then the main page reloads and does not attempt to access it's Direct Action.

Is the direct action method public?


So, should I not include my components in the application package com.psgs.dwtm?

It should/can all go in there. I usually put it in a subpackage ui (i.e. com.psgs.dwtm.ui), so that when I run javadoc I get all my model in one package, and my user interface stuff in another package.


John



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Xcode : copy web component (From: benoit cantin <email@hidden>)
 >Re: Xcode : copy web component (From: John Larson <email@hidden>)
 >Re: Xcode : copy web component (From: Paul Lynch <email@hidden>)
 >Moving Classes into a package (From: Don Lindsay <email@hidden>)
 >Re: Moving Classes into a package (From: John Larson <email@hidden>)
 >Re: Moving Classes into a package (From: Don Lindsay <email@hidden>)
 >Re: Moving Classes into a package (From: Don Lindsay <email@hidden>)

  • Prev by Date: Re: Session timeout and memory
  • Next by Date: Error updating row in database
  • Previous by thread: Re: Moving Classes into a package
  • Next by thread: Re: Xcode : copy web component
  • Index(es):
    • Date
    • Thread