Hi Peter,

On Jul 11, 2006, at 10:59 AM, Peter wrote:

I have read some of the past post on adding an EOModel to an existing
WO project.  It seems like much of the problems with adding a model to
the project have been no adding it as "Create Folder References".

I have a slightly different problem.  I have an EOModel that is part
of a separate framework.  I need to use some of the entities in that
EOModel (and business logic in the related java classes in the
framework) in an existing project.

I can add the framework to the project without a problem (application
server target) and compile my project successfully.  However, when
running the project, I do not see my the model I added (via the
external framework).

Has the framework been installed in /Library/Frameworks?


I am checking this using the following (EOModelGroup.defaultGroup ()).models().

That is the correct test for this.


As a test I created a new WO Application project and added the
framework in the wizard setup.  After I add the framework, the next
part of the wizard asks to Add EOModels.  (My model appears).  When I
run the test project, I can see the model and all works fine.

I have not used that before, but it seems to me that your model should _not_ show up if it is in a framework.


Further testing, I removed the framework from the project, cleaned,
re-indexed and re-ran the project.  As I expected, the model did not
show.  However, when I attempted to re-add the framework the project,
I could no longer get it to show up again.

I am just not sure what "magic" happens during the wizard setup for
the project and how I can manually add a framework (with an EOModel)
to a project.  How does a WO Application "know" what models it "has"
(i.e. where in the project is this information stored)?  I have
searched the targets, and project files without luck.

It is not explicitly stored. The models are located from the classpath at runtime. For example, if the classpath as
/Library/Frameworks/MyFramework.framework/Resources/Java/MyFramework.jar
Then the app will load any EOModels found in
/Library/Frameworks/MyFramework.framework/Resources/*.eomodeld

Look in your app project in the directory
MyApp/build/Development/MyApp.woa/Contents/MacOS/MacOSClassPath.txt
and see what is getting on the classpath.

It could also be a problem in the framework with the eomodeld not being included in the FW properly.

Chuck

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to