• 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: WOResourceURL via java code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOResourceURL via java code


  • Subject: Re: WOResourceURL via java code
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 23 May 2006 17:26:42 -0400

Also:

http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Applications/ Development/Database_vs_Filesystem

ms

On May 23, 2006, at 5:24 PM, Travis Cripps wrote:

Amadeo,

Hi, again. If you have the images in a database, you need to retrieve them as a blob (NSData type) and you can then just hand the data to a WOImage for display. If, instead, you're storing the path to the image that's stored somewhere on a hard drive, you could just get the file at that URL path.

A resource URL is to help you get access to resources within in your project. You would use the WOResourceManager to get the correct path url and then do something with the file at that path. You can alternately ask the WOResourceManager for the bytes of the resource.

So, if you had an image as part of your project, you could do something like this:

public NSData getImageData(String imageName) {
byte[] imageBytes = WOApplication.application().resourceManager ().bytesForResourceNamed(imageName, "app", nil);
return new NSData(imageBytes);
}


If your image was in a framework, you'd need to change "app" to the framework name.

Well, have a nice day.

Travis



On May 23, 2006, at 12:06 PM, webobjects-dev- email@hidden wrote:

Message: 6
Date: Tue, 23 May 2006 20:43:24 +0200
From: Amedeo Mantica <email@hidden>
Subject: WOResourceURL via java code
To: WebObjects Dev Apple <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

I have images in a database,

How to implement WOResourceURL via java code to get a string
containing the image url?

Thanks

Amedeo

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


This email sent to email@hidden

_______________________________________________ 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: 
 >Re: WOResourceURL via java code (From: Travis Cripps <email@hidden>)

  • Prev by Date: Re: WOResourceURL via java code
  • Next by Date: Re: AJAX WebObjects Integration
  • Previous by thread: Re: WOResourceURL via java code
  • Next by thread: xCode 2.3
  • Index(es):
    • Date
    • Thread