<?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: Two ways to programmatically work with a combobox, and still use the change event handler</title>
	<atom:link href="http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/</link>
	<description>John Wilker: Community, Code, Randomness</description>
	<lastBuildDate>Tue, 24 Jan 2012 20:39:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Rich</title>
		<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/comment-page-1/#comment-3365</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Tue, 15 Jun 2010 23:15:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnwilker.com/j/index.cfm/2007/6/29/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler#comment-3365</guid>
		<description>FOr what it&#039;s worth, I get unreadable blue text on grey background </description>
		<content:encoded><![CDATA[<p>FOr what it&#039;s worth, I get unreadable blue text on grey background</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril</title>
		<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/comment-page-1/#comment-3079</link>
		<dc:creator>Cyril</dc:creator>
		<pubDate>Wed, 27 Jan 2010 09:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnwilker.com/j/index.cfm/2007/6/29/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler#comment-3079</guid>
		<description>Creating and firing change events might trigger something else elsewhere, and from documentation change event fire on USER interaction. So I prefer Tom&#039;s solution. Except that having a method that receive an event.. or not.. is, as you said, less clear, and might be source of error. 
 
Apply a bit of refactoring:  
first you should name your handlers &quot;handleXxx&quot; or &quot;onXxx&quot; 
private function onNewSavedScheduleSelection(e:ListEvent):void 
{ 
  var listFiringTheEvent:ListBase = ListBase(e.target); 
  selectNewSavedSchedule( listFiringTheEvent.selectedItem); 
} 
 
private function selectNewSavedSchedule( selectedSchedule:SavedScheduleVO):void 
{ 
  your actual code... 
} 
 
onShow() can now set selectedItem and call selectNewSavedSchedule. </description>
		<content:encoded><![CDATA[<p>Creating and firing change events might trigger something else elsewhere, and from documentation change event fire on USER interaction. So I prefer Tom&#039;s solution. Except that having a method that receive an event.. or not.. is, as you said, less clear, and might be source of error. </p>
<p>Apply a bit of refactoring:<br />
first you should name your handlers &quot;handleXxx&quot; or &quot;onXxx&quot;<br />
private function onNewSavedScheduleSelection(e:ListEvent):void<br />
{<br />
  var listFiringTheEvent:ListBase = ListBase(e.target);<br />
  selectNewSavedSchedule( listFiringTheEvent.selectedItem);<br />
} </p>
<p>private function selectNewSavedSchedule( selectedSchedule:SavedScheduleVO):void<br />
{<br />
  your actual code&#8230;<br />
} </p>
<p>onShow() can now set selectedItem and call selectNewSavedSchedule.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jwilker</title>
		<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/comment-page-1/#comment-2992</link>
		<dc:creator>jwilker</dc:creator>
		<pubDate>Thu, 31 Dec 2009 17:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnwilker.com/j/index.cfm/2007/6/29/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler#comment-2992</guid>
		<description>Sounds like a personal problem. Cut-n-paste into the editor of your choice I guess.  </description>
		<content:encoded><![CDATA[<p>Sounds like a personal problem. Cut-n-paste into the editor of your choice I guess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zanpher</title>
		<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/comment-page-1/#comment-2991</link>
		<dc:creator>Zanpher</dc:creator>
		<pubDate>Thu, 31 Dec 2009 16:50:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnwilker.com/j/index.cfm/2007/6/29/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler#comment-2991</guid>
		<description>Sorry, can&#039;t read code that isn&#039;t colored correctly. (normal colors, black on white bg).</description>
		<content:encoded><![CDATA[<p>Sorry, can&#8217;t read code that isn&#8217;t colored correctly. (normal colors, black on white bg).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Ortega</title>
		<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/comment-page-1/#comment-1281</link>
		<dc:creator>Tom Ortega</dc:creator>
		<pubDate>Wed, 07 Jan 2009 02:45:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnwilker.com/j/index.cfm/2007/6/29/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler#comment-1281</guid>
		<description>Ahh..but you see.  The only reason I suggested it was because you &quot;weren&#039;t&quot; looking at the event. :)

Obviously if your working with the event, that would be very dangerous and not a nice way to go.

If you want to plan for the future, then I&#039;d say create a separate function from the handler.  One that excutes when that value changes, than call that function from the show and handler function.  This way, your event logic never mixes with the change logic.</description>
		<content:encoded><![CDATA[<p>Ahh..but you see.  The only reason I suggested it was because you &amp;quot;weren&#039;t&amp;quot; looking at the event. :)</p>
<p>Obviously if your working with the event, that would be very dangerous and not a nice way to go.</p>
<p>If you want to plan for the future, then I&#039;d say create a separate function from the handler.  One that excutes when that value changes, than call that function from the show and handler function.  This way, your event logic never mixes with the change logic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Ortega</title>
		<link>http://johnwilker.com/2007/10/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler/comment-page-1/#comment-233</link>
		<dc:creator>Tom Ortega</dc:creator>
		<pubDate>Fri, 12 Oct 2007 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnwilker.com/j/index.cfm/2007/6/29/Two-ways-to-programmatically-work-with-a-combobox-and-still-use-the-change-event-handler#comment-233</guid>
		<description>Ahh..but you see.  The only reason I suggested it was because you &quot;weren&#039;t&quot; looking at the event. :)

Obviously if your working with the event, that would be very dangerous and not a nice way to go.

If you want to plan for the future, then I&#039;d say create a separate function from the handler.  One that excutes when that value changes, than call that function from the show and handler function.  This way, your event logic never mixes with the change logic.</description>
		<content:encoded><![CDATA[<p>Ahh..but you see.  The only reason I suggested it was because you &quot;weren&#8217;t&quot; looking at the event. :)</p>
<p>Obviously if your working with the event, that would be very dangerous and not a nice way to go.</p>
<p>If you want to plan for the future, then I&#8217;d say create a separate function from the handler.  One that excutes when that value changes, than call that function from the show and handler function.  This way, your event logic never mixes with the change logic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

