• 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: Problem showing project images in app ported to WOLips from XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem showing project images in app ported to WOLips from XCode


  • Subject: Re: Problem showing project images in app ported to WOLips from XCode
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 7 Feb 2008 16:25:09 -0800

This is such a fun part of WOLips!

I think you are using the Fluffy Bunny layout. That flattens resources automatically. If you want WebServerResources/jpg/ wombat.jpg (instead of WebServerResources/wombat.jpg) in the built project, flattening is not what you want.


On Feb 7, 2008, at 3:31 PM, Apoorva Muralidhara wrote:

I'm migrating an old WebObjects application from XCode to WOLips (version 3.3.4760). Using the WOLips wizard, I've created an empty WebObjects application and copied all the Java code, components, and EOModel into the appropriate directories, and configured the build path as necessary. The application builds, launches, and fetches from the database. But none of the images show up.

In other applications, we usually serve an image by storing it externally, with a symbolic link to its directory from just under / Library/WebServer/Documents/, and displaying it using the WOImage "src" binding with the corresponding absolute URL. But the application I'm porting keeps the images in its project, using the WOImage "filename" binding and relying on WOResourceManager to find them.

I have, for example, a WOImage on the front page, with a filename binding: filename = "wombat.jpg".

If I put wombat.jpg into the top-level project directory, the image appears when I run the application. If I put it in WebServerResources, it does not. The project I'm porting has an existing static resource directory structure, with subdirectories such as "gif" and "jpg" and "css". When I put this jpg where I *really* want it--at WebServerResources/jpg/wombat.jpg--it definitely doesn't show up!

With the resources where I really want them, I have right-clicked on WebServerResources, on jpg, and even on the individual .jpg (using "add all files with extension") , and chosen WOLips Tools -- > Include As WebServerResource. My wsresources.include.patternset:

WebServerResources/**/*
**/WebServerResources
**/css
**/gif
**/gimp
**/html
**/jpg
**/js
**/xml
**/*.jpg

I _think_ you want to change all that to just WebServerResources/**/*


This file was not mentioned in the wsresources node of my build.xml,

That is because Fluffy Bunnies don't like the aggravation of that file. And everyone likes a fluffy bunny!



so I hand-edited it.  It looks like this now:

<wsresources dir="WebServerResources">
dir="WebServerResources" triggers the flattening (IIRC) Change that to
<wsresources dir=".">


	<patternset>
		<includesfile name="woproject/wsresources.include.patternset" />
		<include name="**/*" />
		<exclude name="CVS" />
		<exclude name=".svn" />
		<excludesfile name="woproject/wsresources.exclude.patternset" />
	</patternset>
</wsresources>

Or just dispense with that nutty pattern file and try this in the build.xml:
<wsresources dir=".">
<patternset>
<include name="WebServerResources/**/*" />
<exclude name="CVS" />
<exclude name=".svn" />
</patternset>
</wsresources>



I also tried adding <include name="*.jpg"/>, <include name="jpg/ *.jpg"/>, <include name="**/*.jpg"/>, and <include name="WebServerResources/jpg/*.jpg"/>.

But no matter what I do, the images just don't show up!

I right-clicked on WebServerResources and brought up Properties and made sure that "Executable" was checked. I looked inside my built copy of the application, and the resources are there, although I did note a duplicate "WebServerResources" in the path--that is, my jpg is at build/marsupials.woa/Contents/WebServerResources/ WebServerResources/jpg/wombat.jpg. I tried manually "correcting" this error, so that this image was at build/marsupials.woa/Contents/ WebServerResources/jpg/wombat.jpg, and reran the application, but the image still doesn't appear.

Any ideas?


I'm not 100% that any of that will work, but it should put you on the right track.

Chuck


--

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Problem showing project images in app ported to WOLips from XCode
      • From: Apoorva Muralidhara <email@hidden>
References: 
 >Problem showing project images in app ported to WOLips from XCode (From: Apoorva Muralidhara <email@hidden>)

  • Prev by Date: Problem showing project images in app ported to WOLips from XCode
  • Next by Date: Re: Educate me on generics please...
  • Previous by thread: Problem showing project images in app ported to WOLips from XCode
  • Next by thread: Re: Problem showing project images in app ported to WOLips from XCode
  • Index(es):
    • Date
    • Thread