<?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"
	>
<channel>
	<title>Comments on: Alert Component, handling event in a better way</title>
	<atom:link href="http://brajeshwar.com/2003/alert-component-handling-event-in-a-better-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://brajeshwar.com/2003/alert-component-handling-event-in-a-better-way/</link>
	<description>Brajeshwar is an ardent believer of KISS (Keep It Simple Stupid), he envision pushing the technical envelop time and again for the betterment of commercial and practical applications.</description>
	<pubDate>Fri, 21 Nov 2008 04:22:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Alessio Prosperi</title>
		<link>http://brajeshwar.com/2003/alert-component-handling-event-in-a-better-way/#comment-973</link>
		<dc:creator>Alessio Prosperi</dc:creator>
		<pubDate>Mon, 29 Mar 2004 09:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.brajeshwar.com/wp/2003/alert-component-handling-event-in-a-better-way/#comment-973</guid>
		<description>The correct code to use Alert Component is:

import mx.controls.Alert;

class test{
  private var myAttr:String;

  public function test(){
    myAttr = "This is a test";
  }
  public function click(evt){
    trace(evt.detail + " in class: " + myAttr);
  }

  public function foo(){
    Alert.show("Message", "Confirmation", Alert.OK &#124; Alert.CANCEL &#124; Alert.YES, null, this, "", Alert.OK);
  }
}

I hope it has been usefull!
Bye
</description>
		<content:encoded><![CDATA[<p>The correct code to use Alert Component is:</p>
<p>import mx.controls.Alert;</p>
<p>class test{<br />
  private var myAttr:String;</p>
<p>&#8195;public function test(){<br />
    myAttr = &#8220;This is a test&#8221;;<br />
  }<br />
  public function click(evt){<br />
    trace(evt.detail + &#8221; in class: &#8221; + myAttr);<br />
  }</p>
<p>&#8195;public function foo(){<br />
    Alert.show(&#8221;Message&#8221;, &#8220;Confirmation&#8221;, Alert.OK | Alert.CANCEL | Alert.YES, null, this, &#8220;&#8221;, Alert.OK);<br />
  }<br />
}</p>
<p>I hope it has been usefull!<br />
Bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kredit</title>
		<link>http://brajeshwar.com/2003/alert-component-handling-event-in-a-better-way/#comment-972</link>
		<dc:creator>Kredit</dc:creator>
		<pubDate>Fri, 20 Feb 2004 15:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.brajeshwar.com/wp/2003/alert-component-handling-event-in-a-better-way/#comment-972</guid>
		<description>I agree with your points of views. Bur if want to 
solve financial problems look at kredit ohne 
schufa, going on with 
kredite and 
schufafreie kredite. 
More informations about judgement at kredit tips.&#160; 
Looking at kredit and
kredit schufafrei and
kredit online 
you find final informations. 
greetings from germany
:)</description>
		<content:encoded><![CDATA[<p>I agree with your points of views. Bur if want to <br />
solve financial problems look at kredit ohne <br />
schufa, going on with <br />
kredite and <br />
schufafreie kredite. <br />
More informations about judgement at kredit tips.&nbsp; <br />
Looking at kredit and<br />
kredit schufafrei and<br />
kredit online <br />
you find final informations. <br />
greetings from germany<br /> <img src='http://brajeshwar.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kredit</title>
		<link>http://brajeshwar.com/2003/alert-component-handling-event-in-a-better-way/#comment-971</link>
		<dc:creator>Kredit</dc:creator>
		<pubDate>Fri, 20 Feb 2004 14:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.brajeshwar.com/wp/2003/alert-component-handling-event-in-a-better-way/#comment-971</guid>
		<description>I agree with your main topics. But if youz need 
some solution for your financial problems.
You may have a look f?r my site. Offering 
Kredit ohne Schufa and further on
Kredit online&#160; im 
combination with online tips.
You can also choose between 
Kredite and schufafreie 
Kredite. Meanwhile you can look at
Kredit ohne Schufa and 
fulfill the 
formular at Kredit schufafrei 
and Kredit ohne Schufa.

greetings from germany
o:)</description>
		<content:encoded><![CDATA[<p>I agree with your main topics. But if youz need <br />
some solution for your financial problems.<br />
You may have a look f?r my site. Offering <br />
Kredit ohne Schufa and further on<br />
Kredit online&nbsp; im <br />
combination with online tips.<br />
You can also choose between <br />
Kredite and schufafreie <br />
Kredite. Meanwhile you can look at<br />
Kredit ohne Schufa and <br />
fulfill the <br />
formular at Kredit schufafrei <br />
and Kredit ohne Schufa.</p>
<p>greetings from germany<br />
o:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre Angelantoni</title>
		<link>http://brajeshwar.com/2003/alert-component-handling-event-in-a-better-way/#comment-970</link>
		<dc:creator>Andre Angelantoni</dc:creator>
		<pubDate>Wed, 12 Nov 2003 19:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.brajeshwar.com/wp/2003/alert-component-handling-event-in-a-better-way/#comment-970</guid>
		<description>Hi, I tried your solution to using an alert within a class, but with no luck. The syntax checker comes back with "There is no property with the name 'confirmListener'".

The code is within a method of a form class, so it suffers from the scope issue you discuss above.

Here is the code:

	private function isOptionsValid():Boolean {
		var isValid = false;
		var confirmListener:Function = null;
		var messageStr:String = null;
		
		Alert.okLabel = "YES!!!";
		
		confirmListener = {
			click: function (evt) { 
			  	trace (evt.detail + "was clicked"); 
			}
		};

		if (2 &gt; 1) {
			messageStr = "The number of Open File licenses is greater than the sum of servers and clients. Is this OK?";
			Alert.show(messageStr, "Confirm Open File Licenses", Alert.YES &#124; Alert.NO, this, confirmListener, null, Alert.OK);
		}
	return true;
}


Have you successfully used the method you described from within a class?

Thanks for your great site
Andre</description>
		<content:encoded><![CDATA[<p>Hi, I tried your solution to using an alert within a class, but with no luck. The syntax checker comes back with &#8220;There is no property with the name &#8216;confirmListener&#8217;&#8221;.</p>
<p>The code is within a method of a form class, so it suffers from the scope issue you discuss above.</p>
<p>Here is the code:</p>
<p>	private function isOptionsValid():Boolean {<br />
		var isValid = false;<br />
		var confirmListener:Function = null;<br />
		var messageStr:String = null;</p>
<p>		Alert.okLabel = &#8220;YES!!!&#8221;;</p>
<p>		confirmListener = {<br />
			click: function (evt) { <br />
			  	trace (evt.detail + &#8220;was clicked&#8221;); <br />
			}<br />
		};</p>
<p>		if (2 &gt; 1) {<br />
			messageStr = &#8220;The number of Open File licenses is greater than the sum of servers and clients. Is this OK?&#8221;;<br />
			Alert.show(messageStr, &#8220;Confirm Open File Licenses&#8221;, Alert.YES | Alert.NO, this, confirmListener, null, Alert.OK);<br />
		}<br />
	return true;<br />
}</p>
<p>Have you successfully used the method you described from within a class?</p>
<p>Thanks for your great site<br />
Andre</p>
]]></content:encoded>
	</item>
</channel>
</rss>
