> On 19 Oct 2014, at 00:52, Jens Alfke <j...@mooseyard.com> wrote:
> 
> 
>> On Oct 18, 2014, at 5:33 AM, Gerriet M. Denkmann <gerr...@mdenkmann.de> 
>> wrote:
>> 
>> Note: the head has only 12 children (the first 10 are identical to 10.9), 
>> and there is no body at all.
> 
> Weird! Are you sure that the page has finished loading by the time you made 
> the call? Maybe your code is running at a point when only the head part of 
> the document has yet been loaded.

Excellent idea indeed.

Old way (does NOT work on 10.10, works on all OS X before 10):

NSString *ss = ... some html ...
WebFrame *mainFrame = [ self.webView mainFrame ];
[ mainFrame loadHTMLString: ss  baseURL: nil ]; 
[ self performSelector: @selector(parsData) withObject: nil afterDelay: 0 ];

This performSelector:afterDelay: was used exactly for the reason you mentioned.

I changed the delay from 0 to 10 seconds - and it works perfectly on 10.10. But 
of course this is a very silly hack.

So, finally I changed the code so that parsData is called from 
webView:didFinishLoadForFrame:

Thanks for pointing me in the right direction!


Kind regards,

Gerriet.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to