possible bug in webView big and small load sizes...
possible bug in webView big and small load sizes...
- Subject: possible bug in webView big and small load sizes...
- From: jon <email@hidden>
- Date: Thu, 01 Oct 2009 17:17:28 -0600
I did an experiment, where i had a small window with a small webView
in it...
and then a large window with a large webView in it, in the same XIB
file... small was like 200 pxs and the large one was nearly as
large as the screen.
(actually i had the same window, and ran a loop, while the program
was executing, i would simply drag the window to small, and then large
size, randomly and controled one execution of the loop per drag of
the window, to make sure, i would do several smalls in a row, and
then several large in a row... and then alternated for a while...) i
also have a timer to delay at my setting, so that i am sure the page
is completely loaded...
i loaded a complex search result of Ebay.com web site into the
webView, Ebay has a lot of flash and Java, and lots of real Cr*P on
in their search pages...... (this will only fail with an Ebay site or
a site with lots of kludge, not other sites)
after i load each view, I ask it for it's DOM document....
DOMDocument *myDOMDocument = [[offScreeneBayWebView mainFrame]
DOMDocument];
very consistently later in the class, the small window ALWAYS fails
to have a viable DOMDocument or atleast partially non viable......
while the large webView consistently always gives me all of the data....
I'm wondering if this is a bug, and if anyone has seen something like
this before?
here is the code that consistently fails on the small window, the
"attValue" consistently is "nil" in the small window, and always
correctly sets in the large window...
on exactly the same page load.. which is a very complicated search on
a specific category of ebay.com....
this looks like a bug to me... but maybe someone knows what is going
on here..
interestingly, "thelength1" is always correct, on both the small
and big windows... i can't find any memory reason why this would fail
on small and then fly on a big window... (looking for a memory problem
in my program)...
Jon.
DOMDocument *myDOMDocument = [[offScreeneBayWebView mainFrame]
DOMDocument];
DOMNodeList *allTableNodes = [myDOMDocument
getElementsByTagName:@"table"];
NSUInteger thelength1 = [allTableNodes length];
DOMNode *node;
DOMNode *att;
NSString *attValue;
DOMNamedNodeMap *attributes;
for (i = 0; i < thelength1; ++i)
{
node = [allTableNodes item:i];
attributes = [node attributes];
att = [attributes item:0];
attValue = [att nodeValue];
if(attValue != nil)
{
isItInThere = [attValue rangeOfString:@"nol"];
if (isItInThere.location != NSNotFound) //---------- this bothers
me, what is the non negative way of asking this if statement?
if (![attValue isEqualToString: @"cmpb nol"]) {break;}
}
}
_______________________________________________
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