<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments for bc</title>
	<atom:link href="http://bclary.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://bclary.com/blog</link>
	<description>Bob Clary's ramblings about Mozilla, Web Development, everything and nothing...</description>
	<pubDate>Tue, 06 Jan 2009 23:21:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Are Macs a ripoff ? by Geeks-In-Route</title>
		<link>http://bclary.com/blog/2007/12/22/are-macs-a-ripoff/comment-page-1/#comment-93</link>
		<dc:creator>Geeks-In-Route</dc:creator>
		<pubDate>Sun, 21 Dec 2008 22:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2007/12/22/are-macs-a-ripoff/#comment-93</guid>
		<description>Some people like MACs and some people like Windows based system. Personally, I would put my ASUS Series G2 with Intel Core 2 Quad Processor, and 4 gigs of RAM up against a MAC any day of the week.

People are always saying that MACs don't break or get viruses as much as PCs. I own Geeks-In-Route which provides computer repair services in 47 states, and I get calls about MACs all the time.

The reason people don't think MACs break down as much, is that there are three times more PCs out there, and three times more opportunities for them to break. Also, the people creating the viruses are obviously going to try to create a virus that will infect as many people as possible, so who do you think they are going to target, The people who make up 25% of the computer owners, or the people who make up 75% of the computer owners.

Lastly, as considerably less people work on MACs as PCs, it is much more expensive to fix them.

Just my thoughts.</description>
		<content:encoded><![CDATA[<p>Some people like MACs and some people like Windows based system. Personally, I would put my ASUS Series G2 with Intel Core 2 Quad Processor, and 4 gigs of RAM up against a MAC any day of the week.</p>
<p>People are always saying that MACs don&#8217;t break or get viruses as much as PCs. I own Geeks-In-Route which provides computer repair services in 47 states, and I get calls about MACs all the time.</p>
<p>The reason people don&#8217;t think MACs break down as much, is that there are three times more PCs out there, and three times more opportunities for them to break. Also, the people creating the viruses are obviously going to try to create a virus that will infect as many people as possible, so who do you think they are going to target, The people who make up 25% of the computer owners, or the people who make up 75% of the computer owners.</p>
<p>Lastly, as considerably less people work on MACs as PCs, it is much more expensive to fix them.</p>
<p>Just my thoughts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by Mohamed</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-92</link>
		<dc:creator>Mohamed</dc:creator>
		<pubDate>Tue, 16 Dec 2008 19:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-92</guid>
		<description>Hello,

It seems like the document is missing some frames because at the time userOnAfterPage() is called not all the content has been loaded.

This can be solved by increasing the delay in doGrab() or adding a delay in userOnAfterPage() before retrieving the document using gSpider.mDocument. 

Thank you for your help.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>It seems like the document is missing some frames because at the time userOnAfterPage() is called not all the content has been loaded.</p>
<p>This can be solved by increasing the delay in doGrab() or adding a delay in userOnAfterPage() before retrieving the document using gSpider.mDocument. </p>
<p>Thank you for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by Mohamed</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-91</link>
		<dc:creator>Mohamed</dc:creator>
		<pubDate>Mon, 15 Dec 2008 19:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-91</guid>
		<description>Hello,

I added the following line in userOnAfterPage() to see what happens.

window.open("chrome://browser/content/pageinfo/pageInfo.xul");

Interestingly the popped out pageInfo window did not have the iframe-embedded image that I could see the in the parent spider window! So it means what we get is not what we see.

It happens on many sites including www.aol.com.

May be it is happening for elements inside DIV elements?</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I added the following line in userOnAfterPage() to see what happens.</p>
<p>window.open(&#8221;chrome://browser/content/pageinfo/pageInfo.xul&#8221;);</p>
<p>Interestingly the popped out pageInfo window did not have the iframe-embedded image that I could see the in the parent spider window! So it means what we get is not what we see.</p>
<p>It happens on many sites including <a href="http://www.aol.com" rel="nofollow">http://www.aol.com</a>.</p>
<p>May be it is happening for elements inside DIV elements?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by bc</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-90</link>
		<dc:creator>bc</dc:creator>
		<pubDate>Mon, 15 Dec 2008 12:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-90</guid>
		<description>Can you send your userhook script to me at feedback @ this domain?</description>
		<content:encoded><![CDATA[<p>Can you send your userhook script to me at feedback @ this domain?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by Mohamed</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-89</link>
		<dc:creator>Mohamed</dc:creator>
		<pubDate>Sun, 14 Dec 2008 23:26:57 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-89</guid>
		<description>Hello,

Thank for your response. Yes, you are right. It is an wrappedJSObject. But it appears still  I do not get all the frames.

What my hook is trying to do is download all the images in each page the spider visits. Since this is identical to the function of firefox pageInfo, I am trying to use the flow of pageInfo.js (I cannot think of a way of directly using pageInfo.js itself).

I can see my hook is missing out some embedded flash images which pageInfo is able to capture. I did some debugging and the difference I notice is pageInfo.js gets more frames out of the window. The way pageInfo receives the window object is 
====
gWindow = window.opener.gBrowser.contentWindow;
gDocument = gWindow.document;
====
The way my hook obtains them is
====
var aDocument = gSpider.mDocument;
var aWindow = gSpider.mDocument.defaultView;		
if (aWindow.wrappedJSObject)
{aWindow = aWindow.wrappedJSObject;
}
====

The processes after that are identical: go through all the frames and use tree-walker.

To cite an example, if I use spider to visit http://home.live.com after signing in to hotmail, the hook says there are 2 frames and it misses out the embedded flash image that appears at the right bottom corner. If I use pageInfo, it says there are four frames and it captures the said flash.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thank for your response. Yes, you are right. It is an wrappedJSObject. But it appears still  I do not get all the frames.</p>
<p>What my hook is trying to do is download all the images in each page the spider visits. Since this is identical to the function of firefox pageInfo, I am trying to use the flow of pageInfo.js (I cannot think of a way of directly using pageInfo.js itself).</p>
<p>I can see my hook is missing out some embedded flash images which pageInfo is able to capture. I did some debugging and the difference I notice is pageInfo.js gets more frames out of the window. The way pageInfo receives the window object is<br />
====<br />
gWindow = window.opener.gBrowser.contentWindow;<br />
gDocument = gWindow.document;<br />
====<br />
The way my hook obtains them is<br />
====<br />
var aDocument = gSpider.mDocument;<br />
var aWindow = gSpider.mDocument.defaultView;<br />
if (aWindow.wrappedJSObject)<br />
{aWindow = aWindow.wrappedJSObject;<br />
}<br />
====</p>
<p>The processes after that are identical: go through all the frames and use tree-walker.</p>
<p>To cite an example, if I use spider to visit <a href="http://home.live.com" rel="nofollow">http://home.live.com</a> after signing in to hotmail, the hook says there are 2 frames and it misses out the embedded flash image that appears at the right bottom corner. If I use pageInfo, it says there are four frames and it captures the said flash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by bc</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-88</link>
		<dc:creator>bc</dc:creator>
		<pubDate>Sun, 14 Dec 2008 17:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-88</guid>
		<description>You may be getting an &lt;a href="https://developer.mozilla.org/en/XPConnect_wrappers" rel="nofollow"&gt;XPConnect wrapper&lt;/a&gt;. You can get the underlying wrapped object using &lt;a href="https://developer.mozilla.org/en/wrappedJSObject" rel="nofollow"&gt;wrappedJSObject&lt;/a&gt;.

try this:

if (aWindow.wrappedJSObject)
{
    aWindow = aWindow.wrappedJSObject;
}</description>
		<content:encoded><![CDATA[<p>You may be getting an <a href="https://developer.mozilla.org/en/XPConnect_wrappers" rel="nofollow">XPConnect wrapper</a>. You can get the underlying wrapped object using <a href="https://developer.mozilla.org/en/wrappedJSObject" rel="nofollow">wrappedJSObject</a>.</p>
<p>try this:</p>
<p>if (aWindow.wrappedJSObject)<br />
{<br />
    aWindow = aWindow.wrappedJSObject;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by Mohamed</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-87</link>
		<dc:creator>Mohamed</dc:creator>
		<pubDate>Sun, 14 Dec 2008 16:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-87</guid>
		<description>Hello,

I am trying to implement a user hook to use with the spider. When I try to retrieve the window using

=====
var aDocument = gSpider.mDocument;
var aWindow = gSpider.mDocument.defaultView;
var num = aWindow.frames.length;
logn("number of frames " + num);
=====

the returned frames count does not contain all the frames (even though they are visible in the spider window). That is the number of frames returned is less than the  built-in pageInfo.js script returns. This is how pageInfo.js does it :
====
if ("arguments" in window &#38;&#38; window.arguments.length &#62;= 1 &#38;&#38;
       window.arguments[0] &#38;&#38; window.arguments[0].doc) {
    gDocument = window.arguments[0].doc;
    gWindow = gDocument.defaultView;
  }
  else {
    if ("gBrowser" in window.opener) {
      gWindow = window.opener.gBrowser.contentWindow;
    }else {
      gWindow = window.opener.frames[0];
     }
    gDocument = gWindow.document;
  }

var num = gWindow.frames.length;
logn("number of frames " + num);
====

What is the thing I am doing wrong here?

Thank you
Mohamed</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I am trying to implement a user hook to use with the spider. When I try to retrieve the window using</p>
<p>=====<br />
var aDocument = gSpider.mDocument;<br />
var aWindow = gSpider.mDocument.defaultView;<br />
var num = aWindow.frames.length;<br />
logn(&#8221;number of frames &#8221; + num);<br />
=====</p>
<p>the returned frames count does not contain all the frames (even though they are visible in the spider window). That is the number of frames returned is less than the  built-in pageInfo.js script returns. This is how pageInfo.js does it :<br />
====<br />
if (&#8221;arguments&#8221; in window &amp;&amp; window.arguments.length &gt;= 1 &amp;&amp;<br />
       window.arguments[0] &amp;&amp; window.arguments[0].doc) {<br />
    gDocument = window.arguments[0].doc;<br />
    gWindow = gDocument.defaultView;<br />
  }<br />
  else {<br />
    if (&#8221;gBrowser&#8221; in window.opener) {<br />
      gWindow = window.opener.gBrowser.contentWindow;<br />
    }else {<br />
      gWindow = window.opener.frames[0];<br />
     }<br />
    gDocument = gWindow.document;<br />
  }</p>
<p>var num = gWindow.frames.length;<br />
logn(&#8221;number of frames &#8221; + num);<br />
====</p>
<p>What is the thing I am doing wrong here?</p>
<p>Thank you<br />
Mohamed</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by bc</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-85</link>
		<dc:creator>bc</dc:creator>
		<pubDate>Mon, 27 Oct 2008 19:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-85</guid>
		<description>Ok. I can confirm the behavior you are seeing. I don't know what is up but it looks like a bug in Spider. I'll try to check it out this evening and see if I can figure it out and fix it. Thanks for the report.</description>
		<content:encoded><![CDATA[<p>Ok. I can confirm the behavior you are seeing. I don&#8217;t know what is up but it looks like a bug in Spider. I&#8217;ll try to check it out this evening and see if I can figure it out and fix it. Thanks for the report.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by Mohamed</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-84</link>
		<dc:creator>Mohamed</dc:creator>
		<pubDate>Mon, 27 Oct 2008 19:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-84</guid>
		<description>Just to clarify : when I said "The add-on works fine on most of the sites when run in a linux environment." I meant sites other than forbes and vanityfair.</description>
		<content:encoded><![CDATA[<p>Just to clarify : when I said &#8220;The add-on works fine on most of the sites when run in a linux environment.&#8221; I meant sites other than forbes and vanityfair.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on YASU 0.0.2.15 by Mohamed</title>
		<link>http://bclary.com/blog/2008/03/24/yasu-00215/comment-page-1/#comment-83</link>
		<dc:creator>Mohamed</dc:creator>
		<pubDate>Mon, 27 Oct 2008 19:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://bclary.com/blog/2008/03/24/yasu-00215/#comment-83</guid>
		<description>After enabling java-script errors and warnings, now I see it fails to go beyond the first page only occasionally (like 10 percent).

Can the presence of  elements be the source for failure? I am thinking this way because www.vanityfair.com fails to go beyond the home page all the time. Their page is made full of div elements.

I do not see any errors thrown during the failure. Presence/absence of a hooker function did not have any effect in my case.

The add-on works fine on most of the sites when run in a linux environment. But when it spiders through some sites with video made for Windows (like streaming video from CBS), firefox hangs. I do not have a way of escaping from it.

Thanks</description>
		<content:encoded><![CDATA[<p>After enabling java-script errors and warnings, now I see it fails to go beyond the first page only occasionally (like 10 percent).</p>
<p>Can the presence of  elements be the source for failure? I am thinking this way because <a href="http://www.vanityfair.com" rel="nofollow">http://www.vanityfair.com</a> fails to go beyond the home page all the time. Their page is made full of div elements.</p>
<p>I do not see any errors thrown during the failure. Presence/absence of a hooker function did not have any effect in my case.</p>
<p>The add-on works fine on most of the sites when run in a linux environment. But when it spiders through some sites with video made for Windows (like streaming video from CBS), firefox hangs. I do not have a way of escaping from it.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
