• 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: A text view finishes getting images in HTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A text view finishes getting images in HTML


  • Subject: Re: A text view finishes getting images in HTML
  • From: Dan Wood <email@hidden>
  • Date: Thu, 27 Jun 2002 21:02:29 -0700

This may not be the answer you're looking for exactly, but I may be able to help. The way that Watson accomplishes this is to use CURLHandle instead of NSURLHandle to load the http:// URLs. CURLHandle (see curlhandle.sourceforge.net) has a notification mechanism whenever a new load is started. So what you can do is pay attention to whenever the rendering of your HTML kicks off the loading of an image, then become its URL loading client, and whenever you are notified that the image load is complete, re-instantiate the NSTextField; this time with the image loaded.

Yikes! Yes, it's bizarrely complex, but it works. If you get yourself on the WatsonDevelopers Yahoo group (see the Watson Developer Page on our site, see .sig below), you can scan the archives for some code I posted a while back that shows how it works. It should be enough to get you going, since some of the third-party Watson developers have gotten it to work....

Regards,
Dan Wood

On Thursday, June 27, 2002, at 07:05 AM, Erik J. Barzeski wrote:

Hi,

I've got a text view through which I display either HTML or plain text.
Unfortunately, if an image in an HTML view isn't in the cache, the only way
to display the image is to wait for it to download and somehow refresh the
view.

What would be nifty is a "textViewDidFinishLoadingAllMyDarnPictures"
notification or something (obviously with a different name <g>) so that I
can refresh the view at that time. I've looked over the docs, mamasam, my
own site and the other Cocoa sites, and haven't found a solution. Of course,
the text view system is a mystery to many and doesn't get as much coverage
as it should, and I may have been barking up the wrong proverbial tree...

This is a standard text view, not modified in any way (I hadn't even hooked
up a delegate until I played with this stuff). It's not editable, but it is
selectable.

Any text view Gods care to point me in the right direction? Thanks...


--
Best wishes,
Erik J. Barzeski

"What counts is not necessarily the size of the dog in the fight;
it's the size of the fight in the dog." - Dwight D. Eisenhower
###################################################################
Email: erik@(anything below) AIM: iacas

http://iacas.org http://weims.net
http://techstra.net http://barzeski.com
http://cocoadevcentral.com http://soundsetcentral.com
http://freshlysqueezedsoftware.com http://applescriptcentral.com
###################################################################
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Calling AppleScript Methods from Obj-C
      • From: Bryan Lund <email@hidden>
References: 
 >A text view finishes getting images in HTML (From: "Erik J. Barzeski" <email@hidden>)

  • Prev by Date: re: view co-ordinate scaling
  • Next by Date: Re: Recognizing standard about box
  • Previous by thread: A text view finishes getting images in HTML
  • Next by thread: Calling AppleScript Methods from Obj-C
  • Index(es):
    • Date
    • Thread