Re: DOMDocument in 10.10
Re: DOMDocument in 10.10
- Subject: Re: DOMDocument in 10.10
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 19 Oct 2014 11:47:10 +0700
> On 19 Oct 2014, at 00:52, Jens Alfke <email@hidden> wrote:
>
>
>> On Oct 18, 2014, at 5:33 AM, Gerriet M. Denkmann <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden