<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: Mucking Dijit</title>
	<atom:link href="http://dojocampus.org/content/2008/02/25/mucking-dijit/feed/" rel="self" type="application/rss+xml" />
	<link>http://dojocampus.org/content/2008/02/25/mucking-dijit/</link>
	<description>The definitive resource for all things Dojo: past, present, future.</description>
	<lastBuildDate>Fri, 05 Mar 2010 11:46:39 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sanmao的幸福(?)生活 &#187; Blog Archive &#187; 扩展标准的 Dijit 控件</title>
		<link>http://dojocampus.org/content/2008/02/25/mucking-dijit/comment-page-1/#comment-416</link>
		<dc:creator>Sanmao的幸福(?)生活 &#187; Blog Archive &#187; 扩展标准的 Dijit 控件</dc:creator>
		<pubDate>Mon, 01 Feb 2010 21:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=50#comment-416</guid>
		<description>[...] 参考资料：Mucking Dijit [...]</description>
		<content:encoded><![CDATA[<p>[...] 参考资料：Mucking Dijit [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pegli</title>
		<link>http://dojocampus.org/content/2008/02/25/mucking-dijit/comment-page-1/#comment-307</link>
		<dc:creator>pegli</dc:creator>
		<pubDate>Tue, 10 Feb 2009 00:56:22 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=50#comment-307</guid>
		<description>Great article!  This was just what I needed to solve my problem, which I&#039;ll describe here in case anyone else runs into the same issue.  I am working on an app that pulls JSON data from a server and puts it into a form for editing.  The dijit.form.Form class has a handy method that does exactly this called setValues(obj) which iterates over the properties of obj and calls setValue on the form widget whose name matches the name of the object property.  This worked great for string and numeric properties of my object, but some of the fields in the object to be edited are dates.  JSON doesn&#039;t specify a notation for date objects -- all dates are encoded as strings in some (hopefully) parsable format.  I wanted to put the dates into dijit.form.DateTextBox form widgets, naturally, but when Form.setValues(obj) called DateTextBox.setValue() with a string, I got an error.

The solution was to subclass DateTextBox as follows:

      dojo.require(&quot;dijit.form.DateTextBox&quot;);
      dojo.declare(&quot;my.dijit.form.DateTextBox&quot;, dijit.form.DateTextBox, {
          setValue: function(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue) {
                      value = new Date(value);
                      this.inherited(arguments);
                    } 
      });

What isn&#039;t mentioned in your article is that it is possible to change argument values before calling this.inherited(arguments).  I can&#039;t say that I looked into this in detail, but resetting &quot;value&quot; to a Date object worked fine and the proper date was displayed in the form.

Thanks again!

p.</description>
		<content:encoded><![CDATA[<p>Great article!  This was just what I needed to solve my problem, which I&#8217;ll describe here in case anyone else runs into the same issue.  I am working on an app that pulls JSON data from a server and puts it into a form for editing.  The dijit.form.Form class has a handy method that does exactly this called setValues(obj) which iterates over the properties of obj and calls setValue on the form widget whose name matches the name of the object property.  This worked great for string and numeric properties of my object, but some of the fields in the object to be edited are dates.  JSON doesn&#8217;t specify a notation for date objects &#8212; all dates are encoded as strings in some (hopefully) parsable format.  I wanted to put the dates into dijit.form.DateTextBox form widgets, naturally, but when Form.setValues(obj) called DateTextBox.setValue() with a string, I got an error.</p>
<p>The solution was to subclass DateTextBox as follows:</p>
<p>      dojo.require(&#8221;dijit.form.DateTextBox&#8221;);<br />
      dojo.declare(&#8221;my.dijit.form.DateTextBox&#8221;, dijit.form.DateTextBox, {<br />
          setValue: function(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue) {<br />
                      value = new Date(value);<br />
                      this.inherited(arguments);<br />
                    }<br />
      });</p>
<p>What isn&#8217;t mentioned in your article is that it is possible to change argument values before calling this.inherited(arguments).  I can&#8217;t say that I looked into this in detail, but resetting &#8220;value&#8221; to a Date object worked fine and the proper date was displayed in the form.</p>
<p>Thanks again!</p>
<p>p.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hack Your Life &#187; Blog Archive &#187; Memorati revamp live! (and dijit.Dialog update)</title>
		<link>http://dojocampus.org/content/2008/02/25/mucking-dijit/comment-page-1/#comment-13</link>
		<dc:creator>Hack Your Life &#187; Blog Archive &#187; Memorati revamp live! (and dijit.Dialog update)</dc:creator>
		<pubDate>Tue, 04 Mar 2008 00:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=50#comment-13</guid>
		<description>[...] follow-up on my dijit.Dialog comments (and here!), I ended-up abandoning my fork. I decided that the original positioning algorithm was acceptable, [...]</description>
		<content:encoded><![CDATA[<p>[...] follow-up on my dijit.Dialog comments (and here!), I ended-up abandoning my fork. I decided that the original positioning algorithm was acceptable, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dsnopek</title>
		<link>http://dojocampus.org/content/2008/02/25/mucking-dijit/comment-page-1/#comment-4</link>
		<dc:creator>dsnopek</dc:creator>
		<pubDate>Mon, 25 Feb 2008 20:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=50#comment-4</guid>
		<description>Great article!  This sort of extension should be a part of any JavaScript developers personal tool set.

However, doing this sort of extension on someone else&#039;s library (ie. dijit), worries me when it deals with internal implementation details.  After all, &quot;titleNode&quot; used in your examples (as far as I know) is not a documented part of dijit.Dialog.  You can only know about this by reading the code.  When a new version of dijit comes out, it is not guaranteed to be there.

I recently wrote about this topic in my blog (coincidentally also concerning dijit.Dialog):

http://www.hackyourlife.org/?p=28

(FYI: I did end up abandoning my &quot;forked&quot; version of dijit.Dialog and ended up using dojo.extend() and other mucking about with internals).

The particular issue with dijit.Dialog isn&#039;t the point.  Its that I seem to end up extending all dijit&#039;s I use in little ways and its starting to worry me the amount of things that will likely break when updating to newer versions.

If this is going to be the &quot;officially sanctioned&quot; method of customizing dijit&#039;s, then users really need to have their internals officially documented and some kind of promise with regard to when and how these APIs can be broken.

Cheers!
David Snopek.

http://www.hackyourlife.org/</description>
		<content:encoded><![CDATA[<p>Great article!  This sort of extension should be a part of any JavaScript developers personal tool set.</p>
<p>However, doing this sort of extension on someone else&#8217;s library (ie. dijit), worries me when it deals with internal implementation details.  After all, &#8220;titleNode&#8221; used in your examples (as far as I know) is not a documented part of dijit.Dialog.  You can only know about this by reading the code.  When a new version of dijit comes out, it is not guaranteed to be there.</p>
<p>I recently wrote about this topic in my blog (coincidentally also concerning dijit.Dialog):</p>
<p><a href="http://www.hackyourlife.org/?p=28" rel="nofollow">http://www.hackyourlife.org/?p=28</a></p>
<p>(FYI: I did end up abandoning my &#8220;forked&#8221; version of dijit.Dialog and ended up using dojo.extend() and other mucking about with internals).</p>
<p>The particular issue with dijit.Dialog isn&#8217;t the point.  Its that I seem to end up extending all dijit&#8217;s I use in little ways and its starting to worry me the amount of things that will likely break when updating to newer versions.</p>
<p>If this is going to be the &#8220;officially sanctioned&#8221; method of customizing dijit&#8217;s, then users really need to have their internals officially documented and some kind of promise with regard to when and how these APIs can be broken.</p>
<p>Cheers!<br />
David Snopek.</p>
<p><a href="http://www.hackyourlife.org/" rel="nofollow">http://www.hackyourlife.org/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.410 seconds -->
