Re: packages?
Re: packages?
- Subject: Re: packages?
- From: "Jerry W. Walker" <email@hidden>
- Date: Sun, 9 Apr 2006 21:31:38 -0400
Hi, Jeffrey,
On Apr 9, 2006, at 6:13 PM, Jeffrey Pearson wrote:
OK. Ive searched the docs and the newly purchased and cracked spine
of the Wrox WO book (just got it from Amazon yesterday..whoo hoo..)
and google is not pulling back what I'm looking for (or maybe I
just don't know how the phrase my query correctly).
In my 'normal' java web apps, I have my classes organized into
packages as per best practices for java. I'm trying to do the same
thing with the WO app.
So I created a folder in my project "com". In that folder, I
created a folder called "metrohero". In that folder, I created a
folder called "entities".
I then created the java class from with EOModeler and saved in the
entities folder.
In XCode I selected "add existing files...". I selected the top
level folder ("com") and gave it the application server target.
Everything looks happy happy. I even made sure to add in the first
line of the java class that was created from EOModeler the package
com.metrohero.entities line.
When you selected the top level folder in the file Open sheet and
clicked the Open button it displayed the Add Existing Files panel. In
that panel, you should have clicked the "Recursively create groups
for any added folders". By doing so, Xcode will traverse the
hierarchy of the files and directories you chose, create a Group for
each directory it finds and organize the files it finds into the
corresponding hierarchy of Groups.
When this is done, you will see your top level folder represented in
the Groups & Files pane as a yellow folder icon. Clicking the reveal
triangle by that icon will open the hierarchy and you should see each
lower level directory also represented as a yellow folder icon.
If you instead clicked "Create Folder References for any added
folders", Xcode will retain the folder hierarchy, but will only
really recognize the top level folder of the hierarchy you add. In
this case, each directory added will be represented as a blue folder
icon.
The reason for this choice is that Xcode must be aware of all the
files for which it is responsible. However, if you add something like
an EOModel, the model is represented by a hierarchy of directories
called a package. Until Xcode was provided with modeling tools, it
really didn't care about the contents of the package, so it only
remained aware of the top directory and basically ignored the
contents. By double clicking on the top directory of the package,
Xcode would simply delegate to EOModeler which had to be aware of the
package's contents, but Xcode didn't.
However, when I compile, it says the class is not found. When I do
a get info on the com directory in xcode, I get the proper target.
But when I go down to metrohero or below level, it does not have
any target. I know this is what my problem is. Issue is, I cannot
figure out how to assign the lower levels to a target.
help please?
It sounds like you've added your hierarchy with the wrong radio
button selected.
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
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