Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to intercept incoming data for a mime type?



I'm trying to create a custom handler for a mime type
(generally: for reformatting a custom text mime type's
incoming data to a certain maximum width). I need to
be able to look at the entire resource data once it's
loaded, I'm not sure how to do it since large
resources come in as blocks of data.

Right now, I've created view and representation
classes for my mime type by subclassing the
WebTextView and WebTextRepresentation classes (yeah
yeah, undocumented, but I needed to test this out
quickly with working code...); I can get it to
reformat the text in my  receivedData:withDataSource:
method most of the time, but only by chunks. Is there
a way to get the whole data, then make send the signal
that it's done?

To that end I've tried to simply accumulate the data
in my receivedData:withDataSource, then reformat it in
my finishedLoadingWithDataSource: and then to actually
do the super's receivedData:withDataSource followed by
the super's finishedLoadingWithDataSource: but it
doesn't seem to always work - for some reason
sometimes the view won't get updated even though the
layout calls do go through.

Can I do this within a mime type handler
implementation, or do I need to look at other classes
for the complete data that can be "transformed" before
it gets displayed.

Any insight is appreciated (let me know if
clarifications of the above are needed!)

Seb


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
_______________________________________________
webkitsdk-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webkitsdk-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.