<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: ActionScript 4 feature request: interfaces with events</title>
	<atom:link href="http://aralbalkan.com/772/feed" rel="self" type="application/rss+xml" />
	<link>http://aralbalkan.com/772</link>
	<description>Passionate geekisms.</description>
	<lastBuildDate>Sun, 12 Feb 2012 17:52:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ozgur</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-264959</link>
		<dc:creator>ozgur</dc:creator>
		<pubDate>Wed, 21 Dec 2011 17:54:12 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-264959</guid>
		<description>you are the man. can&#039;t believe you made that feature request in 2006</description>
		<content:encoded><![CDATA[<p>you are the man. can&#8217;t believe you made that feature request in 2006</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-263860</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Wed, 31 Aug 2011 22:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-263860</guid>
		<description>Hi Aral!
I completely adhere to your request!!! It is really annoying not to have a way to specify events in interfaces... :/
I am developing a game engine. It is based on a solid API, so all abstract and interfaces. The developer does not know the implementation of the components... So I have no way to &#039;codehint&#039; the events of my interfaces.</description>
		<content:encoded><![CDATA[<p>Hi Aral!<br />
I completely adhere to your request!!! It is really annoying not to have a way to specify events in interfaces&#8230; :/<br />
I am developing a game engine. It is based on a solid API, so all abstract and interfaces. The developer does not know the implementation of the components&#8230; So I have no way to &#8216;codehint&#8217; the events of my interfaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-260197</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Wed, 12 May 2010 19:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-260197</guid>
		<description>Plus, you can have your interface extend IEventDispatcher in order to allow you to add event listeners.</description>
		<content:encoded><![CDATA[<p>Plus, you can have your interface extend IEventDispatcher in order to allow you to add event listeners.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-260196</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Wed, 12 May 2010 19:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-260196</guid>
		<description>Why not just define the events you need in a custom event class?</description>
		<content:encoded><![CDATA[<p>Why not just define the events you need in a custom event class?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: senthil kumaran</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-260093</link>
		<dc:creator>senthil kumaran</dc:creator>
		<pubDate>Tue, 27 Apr 2010 17:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-260093</guid>
		<description>Anyone read about as3 signals by robert penner?............</description>
		<content:encoded><![CDATA[<p>Anyone read about as3 signals by robert penner?&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren S.</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-258823</link>
		<dc:creator>Darren S.</dc:creator>
		<pubDate>Tue, 08 Dec 2009 20:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-258823</guid>
		<description>Just a follow up: I was inspired to come up with a solution to this problem so I&#039;ve created a few classes and interfaces that will hopefully make specifying events on an interface a little easier.

See my post here on my blog: http://gamesandtech.wordpress.com/2009/10/14/actionscript-3-specifying-events-on-interfaces/</description>
		<content:encoded><![CDATA[<p>Just a follow up: I was inspired to come up with a solution to this problem so I&#8217;ve created a few classes and interfaces that will hopefully make specifying events on an interface a little easier.</p>
<p>See my post here on my blog: <a href="http://gamesandtech.wordpress.com/2009/10/14/actionscript-3-specifying-events-on-interfaces/" rel="nofollow">http://gamesandtech.wordpress.com/2009/10/14/actionscript-3-specifying-events-on-interfaces/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan P. Reyes</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-258772</link>
		<dc:creator>Juan P. Reyes</dc:creator>
		<pubDate>Thu, 26 Nov 2009 22:48:40 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-258772</guid>
		<description>Totally agree! One may want to be sure that an implementation dispatches certain events.</description>
		<content:encoded><![CDATA[<p>Totally agree! One may want to be sure that an implementation dispatches certain events.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren S.</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-258084</link>
		<dc:creator>Darren S.</dc:creator>
		<pubDate>Tue, 13 Oct 2009 23:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-258084</guid>
		<description>Just thought I&#039;d share some insight on the situation a bit. I&#039;ve been developing interfaces in AS3 for years now, it&#039;s where I like to start with a class. One thing you&#039;ll notice is that interfaces cannot extend from classes. That is to say:


public class MyClass { ... }
public interface MyInterface extends MyClass { ... }


Will not compile (which is to be expected). However, interfaces can extend other interfaces, in fact, interfaces can extend any number of interfaces.


public interface MyBaseInterface { ... }
public interface MyInterface extends IEventDispatcher, MyBaseInterface { ... }


So the trick to get your interfaces to have the add/remove even listener methods is rather easy. The trick is to specify which events are part of the interface contract, which is not supported by the language at the moment. Perhaps someone can come up with an approach using Filipe&#039;s method of specifying events at the class level combining interface inheritance.

I myself enjoy the C# approach to events, in fact I wish Actionscript were C# to tell you the truth. I enjoy C# far more than I do AS3, however I enjoy the display list approach Adobe has taken in the Flash world.</description>
		<content:encoded><![CDATA[<p>Just thought I&#8217;d share some insight on the situation a bit. I&#8217;ve been developing interfaces in AS3 for years now, it&#8217;s where I like to start with a class. One thing you&#8217;ll notice is that interfaces cannot extend from classes. That is to say:</p>
<p>public class MyClass { &#8230; }<br />
public interface MyInterface extends MyClass { &#8230; }</p>
<p>Will not compile (which is to be expected). However, interfaces can extend other interfaces, in fact, interfaces can extend any number of interfaces.</p>
<p>public interface MyBaseInterface { &#8230; }<br />
public interface MyInterface extends IEventDispatcher, MyBaseInterface { &#8230; }</p>
<p>So the trick to get your interfaces to have the add/remove even listener methods is rather easy. The trick is to specify which events are part of the interface contract, which is not supported by the language at the moment. Perhaps someone can come up with an approach using Filipe&#8217;s method of specifying events at the class level combining interface inheritance.</p>
<p>I myself enjoy the C# approach to events, in fact I wish Actionscript were C# to tell you the truth. I enjoy C# far more than I do AS3, however I enjoy the display list approach Adobe has taken in the Flash world.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florian Salihovic</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-257869</link>
		<dc:creator>Florian Salihovic</dc:creator>
		<pubDate>Fri, 18 Sep 2009 18:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-257869</guid>
		<description>I think that&#039;s what the metadata is meant to be for?</description>
		<content:encoded><![CDATA[<p>I think that&#8217;s what the metadata is meant to be for?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Filipe</title>
		<link>http://aralbalkan.com/772/comment-page-1#comment-256075</link>
		<dc:creator>Filipe</dc:creator>
		<pubDate>Wed, 27 May 2009 17:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/772#comment-256075</guid>
		<description>Hi,

I&#039;d suggest C# event handling ...

But for now, when I need an interface to define events, I do something like this:

interface ISomeLoader {
        function addProgressListener(listener:Function,[whatever]):void;
        function removeProgressListener(listener:Function):void;
}
class SomeLoader implements ISomeLoader {
       public function addProgressListener(listener:Function,[whatever]):void{
               this.addEventListener(MyEvent.PROGRESS, listener);
       }
       public function removeProgressListener(listener:Function):void{
               this.removeEventListener(MyEvent.PROGRESS, listener);
       }
}

This doesn&#039;t define the type of event, I specify it in the comments.

Anyway this works fine for me and makes it easier to write the class clients.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;d suggest C# event handling &#8230;</p>
<p>But for now, when I need an interface to define events, I do something like this:</p>
<p>interface ISomeLoader {<br />
        function addProgressListener(listener:Function,[whatever]):void;<br />
        function removeProgressListener(listener:Function):void;<br />
}<br />
class SomeLoader implements ISomeLoader {<br />
       public function addProgressListener(listener:Function,[whatever]):void{<br />
               this.addEventListener(MyEvent.PROGRESS, listener);<br />
       }<br />
       public function removeProgressListener(listener:Function):void{<br />
               this.removeEventListener(MyEvent.PROGRESS, listener);<br />
       }<br />
}</p>
<p>This doesn&#8217;t define the type of event, I specify it in the comments.</p>
<p>Anyway this works fine for me and makes it easier to write the class clients.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

