• 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: how to pass an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to pass an object


  • Subject: Re: how to pass an object
  • From: Robert Walker <email@hidden>
  • Date: Thu, 8 Jan 2004 01:41:25 -0500

Kranthi,

I assume your image in contained in an NSData object after you get it from the database. If this is correct then you would use a WOImage element in the component and bind the image data to the "data" binding and bind a string "image/jpeg" or "image/gif" to the "mimeType" binding.

That's all!

P.S. It sounds like you may be calling some sort of SQL statement directly (based on your description below). If that's the case I'm wondering why you are doing that, instead of letting EOF handle all the SQL stuff for you.

Getting the image data the EOF way would look something more like this:

Picture myPicture;  //assume this exists
NSData theImageData = myPicture.imageData();

or the key value coding way like:

EOEnterpriseObject myPicture;  //assume this exists
NSData theImageData = (NSData)myPicture.valueForKey("imageData");

On Jan 8, 2004, at 12:24 AM, Kranthi Sagar Borra wrote:

Hi,

I have and image file stored in the database as a BLOB object.Now when I fire a query on the database as
Select <object> from <tablename>
I get the object.But now my question is , how do I pass this object to the front(browser) so that the user is able to view the picture. Thanks in advance.


Regards,
Kranthi Sagar
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



--
Sincerely,
Robert Walker
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: WOJC Thread-Problem... makes me crazy
  • Next by Date: RE: how to pass an object
  • Previous by thread: how to pass an object
  • Next by thread: RE: how to pass an object
  • Index(es):
    • Date
    • Thread