<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.5" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Incoherent Babble</title>
	<link>http://blog.stchur.com</link>
	<description>usually about Javascript, but I don't discriminate</description>
	<pubDate>Fri, 21 Nov 2008 17:15:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>Comment on IE Bug dealing with CSS custom cusors by TeamdedoNum</title>
		<link>http://blog.stchur.com/2006/11/02/ie-bug-dealing-with-css-custom-cusors/#comment-6168</link>
		<dc:creator>TeamdedoNum</dc:creator>
		<pubDate>Fri, 21 Nov 2008 14:06:44 +0000</pubDate>
		<guid>http://blog.stchur.com/2006/11/02/ie-bug-dealing-with-css-custom-cusors/#comment-6168</guid>
		<description>Афтар пешы исчо</description>
		<content:encoded><![CDATA[<p>Афтар пешы исчо</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on IE Bug dealing with CSS custom cusors by easefsfam</title>
		<link>http://blog.stchur.com/2006/11/02/ie-bug-dealing-with-css-custom-cusors/#comment-6164</link>
		<dc:creator>easefsfam</dc:creator>
		<pubDate>Fri, 21 Nov 2008 13:17:58 +0000</pubDate>
		<guid>http://blog.stchur.com/2006/11/02/ie-bug-dealing-with-css-custom-cusors/#comment-6164</guid>
		<description>Автор далеко пойдет</description>
		<content:encoded><![CDATA[<p>Автор далеко пойдет</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on IE Bug dealing with CSS custom cusors by WhoriaWhogeda</title>
		<link>http://blog.stchur.com/2006/11/02/ie-bug-dealing-with-css-custom-cusors/#comment-6152</link>
		<dc:creator>WhoriaWhogeda</dc:creator>
		<pubDate>Fri, 21 Nov 2008 07:05:36 +0000</pubDate>
		<guid>http://blog.stchur.com/2006/11/02/ie-bug-dealing-with-css-custom-cusors/#comment-6152</guid>
		<description>В целом, написавший грамотно написал.</description>
		<content:encoded><![CDATA[<p>В целом, написавший грамотно написал.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serializing Objects in Javascript by sstchur</title>
		<link>http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/#comment-5432</link>
		<dc:creator>sstchur</dc:creator>
		<pubDate>Thu, 06 Nov 2008 04:55:54 +0000</pubDate>
		<guid>http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/#comment-5432</guid>
		<description>@kyb:

Some good points.  Take the code for what it's worth... not appropriate for every single possible scenario I guess.</description>
		<content:encoded><![CDATA[<p>@kyb:</p>
<p>Some good points.  Take the code for what it&#039;s worth&#8230; not appropriate for every single possible scenario I guess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serializing Objects in Javascript by kyb</title>
		<link>http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/#comment-5405</link>
		<dc:creator>kyb</dc:creator>
		<pubDate>Wed, 05 Nov 2008 17:41:01 +0000</pubDate>
		<guid>http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/#comment-5405</guid>
		<description>To do the string thing correctly, you need to escape not just any quotes that are in there, but also any /s.
I recommend something like

var stringify_string = function(str) {
   str = str.replace(/\\/g, "\\\\");
   str = str.replace(/\"/g, "\\\"");
   return "\""+str+"\"";
};

The code you provide also, when evaluated, creates an object that is not of the right type. You can get around this in some situations on firefox by setting the __proto__ property - but that's only if you have a name that it should be set to.


Other problems with general usage are loops, or equivalent objects.  If an object or its descendant contains a reference to itself, this method will loop forever.  Equal objects is a pain as well - if there are two references to the same object, when you deserialise, they will no longer be equal to each other.  You can fix using something like this:

{bob: (tmp={key: 1}), alf: tmp}

When that is evaluated, you end up with a bob and alf being === each other.  Of course, other object literal notation parsers may not cope with that, and you have set a global there.

Fixing loops is a real pain - you need to keep a list of all objects that you've dealt with so far, and use references to them if they are the same as an earlier one.</description>
		<content:encoded><![CDATA[<p>To do the string thing correctly, you need to escape not just any quotes that are in there, but also any /s.<br />
I recommend something like</p>
<p>var stringify_string = function(str) {<br />
   str = str.replace(/\\/g, &#034;\\\\&#034;);<br />
   str = str.replace(/\&#034;/g, &#034;\\\&#034;");<br />
   return &#034;\&#034;"+str+&#034;\&#034;";<br />
};</p>
<p>The code you provide also, when evaluated, creates an object that is not of the right type. You can get around this in some situations on firefox by setting the __proto__ property - but that&#039;s only if you have a name that it should be set to.</p>
<p>Other problems with general usage are loops, or equivalent objects.  If an object or its descendant contains a reference to itself, this method will loop forever.  Equal objects is a pain as well - if there are two references to the same object, when you deserialise, they will no longer be equal to each other.  You can fix using something like this:</p>
<p>{bob: (tmp={key: 1}), alf: tmp}</p>
<p>When that is evaluated, you end up with a bob and alf being === each other.  Of course, other object literal notation parsers may not cope with that, and you have set a global there.</p>
<p>Fixing loops is a real pain - you need to keep a list of all objects that you&#039;ve dealt with so far, and use references to them if they are the same as an earlier one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Clean up after your event listeners by A</title>
		<link>http://blog.stchur.com/2007/09/06/clean-up-after-your-event-listeners/#comment-5195</link>
		<dc:creator>A</dc:creator>
		<pubDate>Fri, 31 Oct 2008 21:30:41 +0000</pubDate>
		<guid>http://blog.stchur.com/2007/09/06/clean-up-after-your-event-listeners/#comment-5195</guid>
		<description>It doesn't work when you try to detach an anonymous function using arguments.callee in IE7

to do so in IE7 you have to save the anonymous function into another global var
and then later detach it using that var</description>
		<content:encoded><![CDATA[<p>It doesn&#039;t work when you try to detach an anonymous function using arguments.callee in IE7</p>
<p>to do so in IE7 you have to save the anonymous function into another global var<br />
and then later detach it using that var</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Firefox 3 .pageX / .pageY bug by Mike</title>
		<link>http://blog.stchur.com/2008/07/03/firefox-3-pagex-pagey-bug/#comment-5107</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 29 Oct 2008 22:30:40 +0000</pubDate>
		<guid>http://blog.stchur.com/2008/07/03/firefox-3-pagex-pagey-bug/#comment-5107</guid>
		<description>Thanks for this.</description>
		<content:encoded><![CDATA[<p>Thanks for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on NObama! by sstchur</title>
		<link>http://blog.stchur.com/2008/10/27/nobama/#comment-5064</link>
		<dc:creator>sstchur</dc:creator>
		<pubDate>Tue, 28 Oct 2008 23:39:56 +0000</pubDate>
		<guid>http://blog.stchur.com/2008/10/27/nobama/#comment-5064</guid>
		<description>"Four legs good, two legs bad."</description>
		<content:encoded><![CDATA[<p>&#034;Four legs good, two legs bad.&#034;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on NObama! by TITO THE BUILDER</title>
		<link>http://blog.stchur.com/2008/10/27/nobama/#comment-5056</link>
		<dc:creator>TITO THE BUILDER</dc:creator>
		<pubDate>Tue, 28 Oct 2008 21:19:58 +0000</pubDate>
		<guid>http://blog.stchur.com/2008/10/27/nobama/#comment-5056</guid>
		<description>10-28-08
Beijing, China 
Unassociated Fictional Press

The Government of The Peoples Republic of China has unanimously
endorsed McCain/Palin for President of the United States.

"They are our kind of leaders!" says a Government spokesperson.
"They understand that business and the government should be in control,
not the silly workers, or 'people' as they sometimes call themselves.
Also, we understand the Republic concept. It is Democracy we find
distasteful."

A leading General, who wished to remain anonymous, had this to say
about President McCain: "We planted many post-hypnotic suggestions
in our former P.O.W.'s mind and we are beside ourselves with 
anticipation at having the opportunity to trigger them and have control
of the white house without even having to wage a war..."

"And if that fails," a second anonymous official pipes in "it's not like
George W. Bush did not already sell it to us anyway."


P.S. We sure hope that Sarah Palin and her corrupt comrade Ted Stevens dream of a free Alaska comes true someday so we can do serious business.</description>
		<content:encoded><![CDATA[<p>10-28-08<br />
Beijing, China<br />
Unassociated Fictional Press</p>
<p>The Government of The Peoples Republic of China has unanimously<br />
endorsed McCain/Palin for President of the United States.</p>
<p>&#034;They are our kind of leaders!&#034; says a Government spokesperson.<br />
&#034;They understand that business and the government should be in control,<br />
not the silly workers, or &#039;people&#039; as they sometimes call themselves.<br />
Also, we understand the Republic concept. It is Democracy we find<br />
distasteful.&#034;</p>
<p>A leading General, who wished to remain anonymous, had this to say<br />
about President McCain: &#034;We planted many post-hypnotic suggestions<br />
in our former P.O.W.&#039;s mind and we are beside ourselves with<br />
anticipation at having the opportunity to trigger them and have control<br />
of the white house without even having to wage a war&#8230;&#034;</p>
<p>&#034;And if that fails,&#034; a second anonymous official pipes in &#034;it&#039;s not like<br />
George W. Bush did not already sell it to us anyway.&#034;</p>
<p>P.S. We sure hope that Sarah Palin and her corrupt comrade Ted Stevens dream of a free Alaska comes true someday so we can do serious business.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serializing Objects in Javascript by Oliver</title>
		<link>http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/#comment-5043</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Tue, 28 Oct 2008 15:14:14 +0000</pubDate>
		<guid>http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/#comment-5043</guid>
		<description>Hi Stephen,

very nice and useful code and exactly, what I'm looking for! Thanks a lot for contributing.

As Jarek mentioned before, there are problems with the correct detection of Arrays. My suggestion for solving this is using the property length which does not exist in Object().
So my piece of code looks like:
      if (theObj.constructor === Array
      &#124;&#124;  theObj.length
      &#124;&#124;  typeof(theObj.callee) !== 'undefined')


Regards from munich,

Oliver</description>
		<content:encoded><![CDATA[<p>Hi Stephen,</p>
<p>very nice and useful code and exactly, what I&#039;m looking for! Thanks a lot for contributing.</p>
<p>As Jarek mentioned before, there are problems with the correct detection of Arrays. My suggestion for solving this is using the property length which does not exist in Object().<br />
So my piece of code looks like:<br />
      if (theObj.constructor === Array<br />
      ||  theObj.length<br />
      ||  typeof(theObj.callee) !== &#039;undefined&#039;)</p>
<p>Regards from munich,</p>
<p>Oliver</p>
]]></content:encoded>
	</item>
</channel>
</rss>
