<?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 on: Building Your Own Widget Library with YUI</title>
	<atom:link href="http://www.yuiblog.com/blog/index.php/2008/06/24/buildingwidgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:46:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Stephen Nelson</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-590401</link>
		<dc:creator>Stephen Nelson</dc:creator>
		<pubDate>Sat, 10 Apr 2010 02:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-590401</guid>
		<description>I&#039;ve been attempting to follow this example to create my own custom YUI component. At least with YUI 2.8, the initAttributes() method on Element appears to be an empty stub which does not call its superclass. I can work around it by providing the oConfigs values to the attributeConfig &#039;value&#039; param directly. Was this changed?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been attempting to follow this example to create my own custom YUI component. At least with YUI 2.8, the initAttributes() method on Element appears to be an empty stub which does not call its superclass. I can work around it by providing the oConfigs values to the attributeConfig &#8216;value&#8217; param directly. Was this changed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Roberts</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-587969</link>
		<dc:creator>Baron Roberts</dc:creator>
		<pubDate>Sun, 31 Jan 2010 23:10:40 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-587969</guid>
		<description>Is it possible to use this technique to create a component that internally uses a layout to organize its HTML elements? If it is, do I call the layout&#039;s render method in my component&#039;s render method?</description>
		<content:encoded><![CDATA[<p>Is it possible to use this technique to create a component that internally uses a layout to organize its HTML elements? If it is, do I call the layout&#8217;s render method in my component&#8217;s render method?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satyam</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-583916</link>
		<dc:creator>Satyam</dc:creator>
		<pubDate>Wed, 26 Aug 2009 09:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-583916</guid>
		<description>&lt;a href=&quot;#comment-583883&quot; rel=&quot;nofollow&quot;&gt;Dennis&lt;/a&gt;,

Good question, I should have addressed that.  In the future that won&#039;t be an issue any more, ECMAScript 5 will have setters and getters on all properties and many browsers already support that via proprietary solutions, and there are very good reasons for that.  

Check out the the properties of &lt;a href=&quot;http://developer.yahoo.com/yui/docs/YAHOO.util.Attribute.html&quot; rel=&quot;nofollow&quot;&gt;Attribute&lt;/a&gt;, they provide getter, setter, validator and conversion functions, all features that might be desirable for a regular property but that the language, so far, does not provide.  

Currently, properties are totally passive.  If you have, say, a width property, the change won&#039;t be reflected until the widget is redrawn, if you have a width attribute, the change can be effected immediately.

In the case you mention, the array is like a table of constants, it is not meant to be changed except, possibly, for developers who might add other field types. For the developer using the library, it is meant to be read-only, as if it was a constant, something JavaScript currently does not provide.  It could have been declared (not really, but just for the sake of an example) as an attribute with its readOnly flag set, but that would have complicated access to it.  

In JavaScript we lack constants and private variables, we rely on  naming conventions or documentation to declare the intent so, in the case of field types, we trust they&#039;ll be properly used.</description>
		<content:encoded><![CDATA[<p><a href="#comment-583883" rel="nofollow">Dennis</a>,</p>
<p>Good question, I should have addressed that.  In the future that won&#8217;t be an issue any more, ECMAScript 5 will have setters and getters on all properties and many browsers already support that via proprietary solutions, and there are very good reasons for that.  </p>
<p>Check out the the properties of <a href="http://developer.yahoo.com/yui/docs/YAHOO.util.Attribute.html" rel="nofollow">Attribute</a>, they provide getter, setter, validator and conversion functions, all features that might be desirable for a regular property but that the language, so far, does not provide.  </p>
<p>Currently, properties are totally passive.  If you have, say, a width property, the change won&#8217;t be reflected until the widget is redrawn, if you have a width attribute, the change can be effected immediately.</p>
<p>In the case you mention, the array is like a table of constants, it is not meant to be changed except, possibly, for developers who might add other field types. For the developer using the library, it is meant to be read-only, as if it was a constant, something JavaScript currently does not provide.  It could have been declared (not really, but just for the sake of an example) as an attribute with its readOnly flag set, but that would have complicated access to it.  </p>
<p>In JavaScript we lack constants and private variables, we rely on  naming conventions or documentation to declare the intent so, in the case of field types, we trust they&#8217;ll be properly used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis McCarthy</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-583883</link>
		<dc:creator>Dennis McCarthy</dc:creator>
		<pubDate>Tue, 25 Aug 2009 14:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-583883</guid>
		<description>I notice that in some cases you use configuration attributes, while in other you use ordinary JavaScript properties (e.g., the fields property of the Fields control).  How do you decide when to use a configuration attribute and when to use a property?

Dennis</description>
		<content:encoded><![CDATA[<p>I notice that in some cases you use configuration attributes, while in other you use ordinary JavaScript properties (e.g., the fields property of the Fields control).  How do you decide when to use a configuration attribute and when to use a property?</p>
<p>Dennis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satyam</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-583273</link>
		<dc:creator>Satyam</dc:creator>
		<pubDate>Fri, 07 Aug 2009 06:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-583273</guid>
		<description>Element has many of the methods that help in dealing with a widget but it is not a widget itself, it is not in the YAHOO.widget branch but in YAHOO.util, and it doesn&#039;t have a render method or a destroy one. It really doesn&#039;t deal with the lifetime of the widget as a whole but it helps with plenty of common tasks such as configuration and event handling.

All the newest widgets are derived from Element.  The container family uses a Config object, a forerunner of Attribute and AttributeProvider, earlier widgets as TreeView barely use anything at all. In YUI3, Element turns into Node though far more powerful.

So, Element is the way to go.</description>
		<content:encoded><![CDATA[<p>Element has many of the methods that help in dealing with a widget but it is not a widget itself, it is not in the YAHOO.widget branch but in YAHOO.util, and it doesn&#8217;t have a render method or a destroy one. It really doesn&#8217;t deal with the lifetime of the widget as a whole but it helps with plenty of common tasks such as configuration and event handling.</p>
<p>All the newest widgets are derived from Element.  The container family uses a Config object, a forerunner of Attribute and AttributeProvider, earlier widgets as TreeView barely use anything at all. In YUI3, Element turns into Node though far more powerful.</p>
<p>So, Element is the way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roman</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-583270</link>
		<dc:creator>Roman</dc:creator>
		<pubDate>Thu, 06 Aug 2009 20:52:22 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-583270</guid>
		<description>Hi,

According to Element documentation one should defer dom manipulation with Element. So am I right that the call to render method should be deferred? What is the best concept for widget rendering? I tried to  look through widgets, but they are implemented in different ways. 

Thank you!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>According to Element documentation one should defer dom manipulation with Element. So am I right that the call to render method should be deferred? What is the best concept for widget rendering? I tried to  look through widgets, but they are implemented in different ways. </p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jenny Han Donnelly</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-581614</link>
		<dc:creator>Jenny Han Donnelly</dc:creator>
		<pubDate>Fri, 08 May 2009 22:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-581614</guid>
		<description>@Charles Scott

A better place to ask this type of support question would be the YUI forum at http://tech.groups.yahoo.com/group/ydn-javascript/. It&#039;s a lively community of YUI developers who will likely be able to give you some advice.

Cheers,
Jenny</description>
		<content:encoded><![CDATA[<p>@Charles Scott</p>
<p>A better place to ask this type of support question would be the YUI forum at <a href="http://tech.groups.yahoo.com/group/ydn-javascript/" rel="nofollow">http://tech.groups.yahoo.com/group/ydn-javascript/</a>. It&#8217;s a lively community of YUI developers who will likely be able to give you some advice.</p>
<p>Cheers,<br />
Jenny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Scott</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-581594</link>
		<dc:creator>Charles Scott</dc:creator>
		<pubDate>Tue, 05 May 2009 22:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-581594</guid>
		<description>I am using the latest version of YUI. So far it is awesome! I am using the template found in the &quot;menu&quot; folder. The problem I am having is getting it to accept and 3rd level of menu? I see the nested template and am thinking it is possible, but I cannot seem to figure this one out.

Ideas?</description>
		<content:encoded><![CDATA[<p>I am using the latest version of YUI. So far it is awesome! I am using the template found in the &#8220;menu&#8221; folder. The problem I am having is getting it to accept and 3rd level of menu? I see the nested template and am thinking it is possible, but I cannot seem to figure this one out.</p>
<p>Ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A.R</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-580445</link>
		<dc:creator>A.R</dc:creator>
		<pubDate>Sun, 05 Apr 2009 14:28:22 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-580445</guid>
		<description>Hi,
I finally got inheritance working. I was also able to create my own &quot;widget&quot;. However I am unable to mix Scriptaculous syntax with YUI. Examples:
1) Unable to create a new scriptaculous &quot;Element&quot; 
//Scriptaculous:
var elem = new Element(&quot;div&quot;,{class:&quot;yui-g&quot;});
2) Unable to use Scriptaculous inheritance syntax
with yui
//Scriptaculous
MyView = Class.create(YAHOO.widget.Panel,{
             initialize($super,args)
             {
               $super(this,args);
               ...
             }
             show:function()
             {
               ...
             }
};
then elsewhere var myView = new MyView(args);</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I finally got inheritance working. I was also able to create my own &#8220;widget&#8221;. However I am unable to mix Scriptaculous syntax with YUI. Examples:<br />
1) Unable to create a new scriptaculous &#8220;Element&#8221;<br />
//Scriptaculous:<br />
var elem = new Element(&#8220;div&#8221;,{class:&#8221;yui-g&#8221;});<br />
2) Unable to use Scriptaculous inheritance syntax<br />
with yui<br />
//Scriptaculous<br />
MyView = Class.create(YAHOO.widget.Panel,{<br />
             initialize($super,args)<br />
             {<br />
               $super(this,args);<br />
               &#8230;<br />
             }<br />
             show:function()<br />
             {<br />
               &#8230;<br />
             }<br />
};<br />
then elsewhere var myView = new MyView(args);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A.R</title>
		<link>http://www.yuiblog.com/blog/2008/06/24/buildingwidgets/comment-page-1/#comment-580393</link>
		<dc:creator>A.R</dc:creator>
		<pubDate>Sat, 04 Apr 2009 20:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/06/24/buildingwidgets/#comment-580393</guid>
		<description>Doesn&#039;t work anywhere except on your server.
Where are the examples?</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t work anywhere except on your server.<br />
Where are the examples?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

