Mailing Lists: Apple Mailing Lists

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

WebDocumentText string crash



I'm trying to scrape the text off of a page but am encountering an exception on certain pages when trying to call the WebDocumentText string method. My code looks like this:

- (void)webView:(BBWebView *)sender didFinishLoadForFrame: (WebFrame *)frame {
if (frame == [sender mainFrame]) {
[sender setLoadedFrame:YES];
id document = [[[sender mainFrame] frameView] documentView];
if([document conformsToProtocol:@protocol(WebDocumentText)])
[sender setPageText:[document string]];
}
}

When I load this page:

http://www.microsoft.com/technet/prodtechnol/windows2000serv/deploy/cookbook/cookchp3.mspx

it raises the exception:

"Exception raised during posting of notification. Ignored. exception: *** -[NSPlaceholderDictionary initWithObjects:forKeys:]: number of objects (6) not equal to number of keys (8)

I'm at a loss as to anything I could be doing wrong, unless I shouldn't be calling this method here? It seems to work part (most?) of the time, but is failing out with the exception regularly, and this will eventually crash my app with:

Uncaught exception - *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value
2005-04-13 07:57:06.297 browseback[802] *** Attempt to remove unrecognized exception handler 0xbfffdba0

This is all within the "[document string]" call. Anyone have any ideas? Should I log a bug with apple? Is there a better or alternative way of retrieving the unformatted text of a page from a WebView (without the HTML formatting)?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden



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.