<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.lalex.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>LAlex devblog v6 - Simuler une énumération et/ou des contantes  - Commentaires</title>
  <link>http://blog.lalex.com/</link>
  <atom:link href="http://blog.lalex.com/feed/rss2/comments/297" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Thu, 04 Sep 2008 18:23:47 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
    
    <item>
    <title>Simuler une énumération et/ou des contantes - Philippe</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2397</link>
    <guid isPermaLink="false">urn:md5:3b58c2ea86702420ca8cb507b8753631</guid>
    <pubDate>Sat, 31 Dec 2005 02:11:56 +0000</pubDate>
    <dc:creator>Philippe</dc:creator>
    
    <description>&lt;p&gt;Instructif comme discussion &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;Juste 2 choses : &lt;br /&gt;- comme Zwetan pour l'utilisation des int/Numbers plutôt que des strings (plus efficace, souple, etc),&lt;br /&gt;- je trouve que l'AS2 (et surtout l'AS3) n'a pas trop à envier des autres langages (à part les enums) -- félicitons nous plutôt de sa flexibilité !&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2396</link>
    <guid isPermaLink="false">urn:md5:83fdd92aaab1561e20f6529e28d35176</guid>
    <pubDate>Fri, 30 Dec 2005 10:39:22 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;On y arrive avec le ASSetPropFlags non ? &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; Sinon c'est clair qu'il manque encore des petites choses en ActionScript &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; Mais cela va venir je pense... l'AS3 marque déjà cette évolution &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - Foxy</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2395</link>
    <guid isPermaLink="false">urn:md5:0cdf7627ab04c25eadaf7491c11b31ed</guid>
    <pubDate>Fri, 30 Dec 2005 02:09:22 +0000</pubDate>
    <dc:creator>Foxy</dc:creator>
    
    <description>&lt;p&gt;Ralala et dire que certains ont droit à des typedef, struct, const, inline functions, reféfinitaions des opérateurs, déf de types primitifs, etc ... et que nous on galère comme des chiens pour protégrer en écriture une pauvre variable (et on y arrive même pas)  !&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - LAlex</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2394</link>
    <guid isPermaLink="false">urn:md5:de09915e87454a6d3de56436d97c2395</guid>
    <pubDate>Mon, 26 Dec 2005 14:08:20 +0000</pubDate>
    <dc:creator>LAlex</dc:creator>
    
    <description>&lt;p&gt;De toutes façons, dans l'absolu, il suffit de passer un objet anonyme à un méthode pour qu'il ne tienne plus compte du typage... :p&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - LAlex</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2393</link>
    <guid isPermaLink="false">urn:md5:2695b4be4579936d4addb360a65b390d</guid>
    <pubDate>Mon, 26 Dec 2005 14:07:36 +0000</pubDate>
    <dc:creator>LAlex</dc:creator>
    
    <description>&lt;p&gt;&lt;quote&gt;oui c'est clean niveau du typage a la compilation, mais apres le code peu quand meme etre modifié au runtime (cf autres comments).&lt;/quote&gt;Oui, mais en général je table sur une utilisation &quot;propre&quot; du code... Evidemment, il est toujours possible avec l'opérateur crochets d'aller faire un peu ce qu'on veut! &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;++ ^^&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2392</link>
    <guid isPermaLink="false">urn:md5:32f3a62dc4ad2f5578853473c695f9eb</guid>
    <pubDate>Sat, 24 Dec 2005 11:13:45 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;ASSetPropFlags = ASPF &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - neolao</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2391</link>
    <guid isPermaLink="false">urn:md5:6c5aced6c7fdcf0d3fb6590711fd6408</guid>
    <pubDate>Sat, 24 Dec 2005 10:36:52 +0000</pubDate>
    <dc:creator>neolao</dc:creator>
    
    <description>&lt;p&gt;c'est vrai, j'y avais pas pensé, il y a la stratégie aussi&lt;/p&gt;&lt;p&gt;sinon, ca veut dire quoi ASPF ?&lt;/p&gt;&lt;p&gt;et dans le dernier exemple, ca me gène un peu le remplissage de _cryptMode&lt;br /&gt;dans l'exemple, la logique c'es de choisir le mode dans le constructeur, c'est là que j'aurai créé l'instance de ce qu'il me faut&lt;br /&gt;voire 2 instances si on compte le NoHash&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2390</link>
    <guid isPermaLink="false">urn:md5:94e7d6dc8454881896a71a7ad2f482ec</guid>
    <pubDate>Sat, 24 Dec 2005 09:58:07 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;l'héritage de String au dessus c'est une erreur vu que j'étais dans l'élan de l'idée lol ^_^ et je pense que je vais te piquer ta notation __ASPF__ si cela te dérange pas (faudrait pas qu'on me dise aprés que je te plagie... lol)&lt;br /&gt;EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - zwetan</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2389</link>
    <guid isPermaLink="false">urn:md5:6a5bab0b725733270e591852a3e1836d</guid>
    <pubDate>Sat, 24 Dec 2005 09:49:36 +0000</pubDate>
    <dc:creator>zwetan</dc:creator>
    
    <description>&lt;p&gt;Bah perso faisant presque pareil j ai rien a redire :P.&lt;/p&gt;&lt;p&gt;les 2 seules differences:&lt;br /&gt;- je n'herite meme pas de String&lt;br /&gt;- j'utilise __ASPF__ au lieu de __CONS__&lt;/p&gt;&lt;p&gt;mais bon StageAlign est un cas special, vue que justement on veut des String,&lt;br /&gt;en general je n'utilise que des int/Number bien plus pratique amha (op bitwise, classement par categorie en notation hex, etc.)&lt;/p&gt;&lt;p&gt;Alors oui c'est sur dans le cas d'un enum comme CryptMode, il ne sera pas typé CryptMode mais Number, mais perso ce qui m'interesse surtout c'est le nommage du enum (et la protection ASPF)&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; CryptMode&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; NONE:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt;&amp;nbsp; &amp;nbsp; = &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//public static var CRC32:Number&amp;nbsp; = 0x001&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//public static var ELF:Number&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 0x002&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//public static var MD4:Number&amp;nbsp; &amp;nbsp; &amp;nbsp; = 0x010;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; MD5:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; = 0x020;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; SHA1:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt;&amp;nbsp; &amp;nbsp; = 0x100;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; __ASPF__ = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;_global&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;ASSetPropFlags&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;CryptMode, &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt; , &lt;span style=&quot;color: #cc66cc;&quot;&gt;7&lt;/span&gt;, &lt;span style=&quot;color: #cc66cc;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; Crypter &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; _cryptMode:&lt;span style=&quot;color: #0066CC;&quot;&gt;Array&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; _select:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;_cryptMode&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; CryptMode.&lt;span style=&quot;color: #006600;&quot;&gt;NONE&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; NoHash&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;_cryptMode&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; CryptMode.&lt;span style=&quot;color: #006600;&quot;&gt;MD5&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; MD5&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;_cryptMode&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; CryptMode.&lt;span style=&quot;color: #006600;&quot;&gt;SHA1&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; SHA1&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; Crypter&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;mode:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; _select = mode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; encrypt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;s:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; _cryptMode&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; _select &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; _cryptMode&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; _select &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;encrypt&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; s &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; _cryptMode&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; CryptMode.&lt;span style=&quot;color: #006600;&quot;&gt;NONE&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;encrypt&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;enfin dans l'idée quoi..&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2388</link>
    <guid isPermaLink="false">urn:md5:aa22868926df8b3c9a9d8746f59fcca2</guid>
    <pubDate>Sat, 24 Dec 2005 08:51:43 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;Ah oui sinon et comme cela ?&lt;br /&gt;
&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; vegas.&lt;span style=&quot;color: #006600;&quot;&gt;display&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;StageAlign&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; StageAlign&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; BOTTOM:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;B&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; BOTTOM_LEFT:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;BL&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; BOTTOM_RIGHT:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;BR&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; CENTER:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;LEFT&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;L&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;RIGHT&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;R&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; TOP:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;T&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; TOP_LEFT:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;TL&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; TOP_RIGHT:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;TR&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; __CONS__ = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;_global&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;ASSetPropFlags&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;StageAlign, &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt; , &lt;span style=&quot;color: #cc66cc;&quot;&gt;7&lt;/span&gt;, &lt;span style=&quot;color: #cc66cc;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;
Petit test ensuite dans flash :
&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;import&lt;/span&gt; vegas.&lt;span style=&quot;color: #006600;&quot;&gt;display&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;StageAlign&lt;/span&gt; ;&lt;br /&gt;
&lt;span style=&quot;color: #0066CC;&quot;&gt;trace&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;- &amp;quot;&lt;/span&gt; + StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;TOP_LEFT&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;br /&gt;
StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;TOP_LEFT&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;coucou&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&lt;span style=&quot;color: #0066CC;&quot;&gt;trace&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;- &amp;quot;&lt;/span&gt; + StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;TOP_LEFT&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;br /&gt;
&lt;span style=&quot;color: #0066CC;&quot;&gt;trace&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;gt; &amp;quot;&lt;/span&gt; + StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;TOP_RIGHT&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;br /&gt;
StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;TOP_RIGHT&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;hello&amp;quot;&lt;/span&gt; ;&lt;br /&gt;
&lt;span style=&quot;color: #0066CC;&quot;&gt;trace&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;gt; &amp;quot;&lt;/span&gt; + StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;TOP_RIGHT&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;cela fait ajouter une variable statique dans la classe mais bon ... cela semble fonctionner et c'est plus simple à mon avis non ? &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;br /&gt;
EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2387</link>
    <guid isPermaLink="false">urn:md5:ecd47bf42cc564f981ff5c18869ee4f3</guid>
    <pubDate>Sat, 24 Dec 2005 08:39:33 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;@zwetan :&lt;br /&gt;Encore ce problème de compatibilité avec AS3.... car en fait je préfère l'utilisation des | dans le cas de figure que tu viens de citer au dessus.&lt;br /&gt;Sinon oui tu as raison pour le ASSetPropFlags je le mettrais en 7,7 mais par contre je me demande pourquoi Macromedia n'a pas laissé une porte en AS2 en permettant par exemple d'utiliser directement le ASSetPropFlags en suivant dans la déclaration des propriétés dans une classe AS2.&lt;br /&gt;EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - zwetan</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2386</link>
    <guid isPermaLink="false">urn:md5:6e917211eb29846e57e6d792ca8b1560</guid>
    <pubDate>Sat, 24 Dec 2005 03:15:17 +0000</pubDate>
    <dc:creator>zwetan</dc:creator>
    
    <description>&lt;p&gt;&lt;br /&gt;bon euh joyeux noel à tout le monde&lt;/p&gt;&lt;p&gt;lalex:&lt;br /&gt;&quot;Impossible de rajouter des constantes non-prévues au runtime, du fait du constructeur privé&quot; etc.&lt;br /&gt;oui c'est clean niveau du typage a la compilation, mais apres le code peu quand meme etre modifié au runtime (cf autres comments).&lt;/p&gt;&lt;p&gt;neolao:&lt;br /&gt;&quot;ils ont quand meme pas fait tout ca pour garder les prototypes&lt;br /&gt;c'est ce que j'espère&quot;&lt;br /&gt;bah si justement, maintenant ils suivent le standard ECMAScript (et pas que celui-là d'ailleurs),&lt;br /&gt;et tout ce qui va avec: philosophie object-based, prototype, traits, etc.&lt;br /&gt;et vraiment c'est pas un mal amha&lt;/p&gt;&lt;p&gt;eka:&lt;br /&gt;si tu veux vraiment protéger utilise plutot&lt;br /&gt;_global.ASSetPropFlags(o, props, 7, 7) ;&lt;br /&gt;en mettant 7 sur le dernier param&lt;br /&gt;si quelqu'un veut unlocker en faisant un&lt;br /&gt;_global.ASSetPropFlags(o, props, 0, 1) ;&lt;br /&gt;ta prop sera toujours protégée contre le delete et l'override &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;br /&gt;et euh pour ta maniere de definir des enums...arghhhh mais beurk&lt;br /&gt;ca fait un peu trop de choses a definir pour ce qui devrait etre une simple enumeration amha.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Donc pour reprendre quand meme le sujet du post,&lt;br /&gt;en appliquant le standard ECMAScript donc, dans un but de protection de variables (const, static, ou autre.)&lt;br /&gt;voir ECMA-262 property attributes specification (chapter 8.6.1 , PDF p38/188).&lt;br /&gt;Et merci donc AS d'avoir ASSetPropFlags qui nous permet justement de definir de modifier l'attribut d'une var en tant que readOnly et dontDelete, cad qu'on ne pourra pas changer ni son type ni sa valeur que ce soit a la compilation ET au runtime.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;sinon aussi une autre solution est de ne pas utiliser du tout les enums :).&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;interface&lt;/span&gt; IHashAlgorithm&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; encrypt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; MD5 &lt;span style=&quot;color: #0066CC;&quot;&gt;implements&lt;/span&gt; IHashAlgorithm&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; MD5&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; encrypt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;MD5 hash&amp;quot;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; SHA1 &lt;span style=&quot;color: #0066CC;&quot;&gt;implements&lt;/span&gt; IHashAlgorithm&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; SHA1&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; encrypt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;SHA1 hash&amp;quot;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; Crypter&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; encrypt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;, hash:IHashAlgorithm &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;String&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; hash == &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hash = MD5; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//default&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; hashObj:IHashAlgorithm = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; hash&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; hashObj.&lt;span style=&quot;color: #006600;&quot;&gt;encrypt&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;Et si plus tard on veut rajouter d'autres class de hash il n'y aura pas de switch a modifier, polymorphism is good :D.Mais bon meme si ca presente des avantages, il y a aussi des inconvenients.Apres tout dépends bien sur de ce qu'on cherche a proteger (valeurs possibles, type check seulement a la compilation), ou protection absolue meme au runtime (cad impossible de remplacer la methode de hash parmis un set de methodes données).Sinon pour continuer sur les enums, faire aussi attention à cela:&lt;a href=&quot;http://blogs.msdn.com/peterhal/archive/2005/08/01/446357.aspx&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/peterhal/archive/2005/08/01/446357.aspx&lt;/a&gt;des fois avoir un type d'enum autre qu'un type primitif ca peut trop compliquer les choses&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; StageAlign &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//...&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #b1b100;&quot;&gt;case&lt;/span&gt; StageAlign.&lt;span style=&quot;color: #0066CC;&quot;&gt;left&lt;/span&gt; | StageAlign.&lt;span style=&quot;color: #006600;&quot;&gt;top&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//dans un cas comme ca des enum int sont plus pratiques par ex&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//...&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;bref, juste pour dire que attention a comment on definit ses enums, sur le long terme ca peut vraiment bloquer les choses dans le design du code et forcer a refaire trop de modif sur des simples paramettres.&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2385</link>
    <guid isPermaLink="false">urn:md5:89f1dd47f371684da8e3b111533f46f0</guid>
    <pubDate>Fri, 23 Dec 2005 20:55:02 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;Tu vois une licence dans mes commentaires à quel endroit exactement ?&lt;/p&gt;&lt;p&gt;Je voulais juste illustrer que je trouvais compliqué de faire une constante en AS2...&lt;/p&gt;&lt;p&gt;Excuse moi d'en faire trop hein et d'avoir fait un copier/coller... là dessus je m'en excuse c’est certain.&lt;/p&gt;&lt;p&gt;Ensuite, excuse moi d'essayer de réagir au sujet du post et d'apporter un peu ma modeste contribution à la communauté. Forcément à ce que je vois, il semblerait à tes dires n'en a pas du tout besoin ... et bien alors dommage ^_^&lt;/p&gt;&lt;p&gt;Et surtout excuse moi contrairement à toi de m’intéresser plus au fond qu'à la forme de ce message… &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_biggrin.gif&quot; alt=&quot;:D&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;Je pense par contre plus sérieusement que là c'est toi qui est déplacé au niveau de ta réponse... et que tu cherches la petite bête encore une fois... Tu devrais avoir autre chose à faire la veille de Noël non ? &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_sad.gif&quot; alt=&quot;:(&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;Mais bon... comme on dit : trop bon, trop con…&lt;/p&gt;&lt;p&gt;Je me demande vraiment ce que l'on peut avoir dans la tête quand on vient faire des remarques de ce type ? Sachant que pour le moment je n'ai pas eu de mail de Lalex pour me dire que mes commentaires sont déplacés et dans tous les cas ill est libre de virer mes commentaires si il pense que c'est du &quot;flood de base&quot; .... Et sachant qu’on se connaît un peu il n’y aura pas de problème si il me faisait la réflexion là-dessus par mail.... contrairement à toi que je ne connais ni d’ADAM ni d’EVE…. et là dans ce contexte je ne l'accepte pas.&lt;/p&gt;&lt;p&gt;Donc si tu es là pour faire le lèche botte ... &quot;OUAIH COOL SUPER TON ARTICLE.... et que pour le reste dès que quelqu'un essai de se lancer dans une conversation dans un espace réservé à cela (à ce que je crois) ; forcément avec moi tu es mal tombé....&lt;/p&gt;&lt;p&gt;Désolé Lalex de m’emporter encore une fois et si tu veux effacer ce message n’hésite pas mais là c’est affolant de voir cela.&lt;/p&gt;&lt;p&gt;EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - funkC</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2384</link>
    <guid isPermaLink="false">urn:md5:4a1ac97f554fc62598374a70427cdcfd</guid>
    <pubDate>Fri, 23 Dec 2005 19:48:39 +0000</pubDate>
    <dc:creator>funkC</dc:creator>
    
    <description>&lt;p&gt;t'as pas le sentiment que poster une classe (et encore si ce n'était qu'une !!) d'une 60aine de lignes plus encore 60 lignes de commentaires et de licenses (soit déjà 120 lignes) n'a peut être pas forcément sa place dans un comment de blogs ... tu pourrais te contenter d'en parler et mettre des liens vers tes classes pour illustrer tes propos ? ou encore faire des billets des trackbacks ... autre chose quoi &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;bonnes fêtes à tous &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2383</link>
    <guid isPermaLink="false">urn:md5:52a8ea6934efee3695a1e32b317972e4</guid>
    <pubDate>Fri, 23 Dec 2005 14:55:50 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;Floodeur de quoi ? je peux savoir ? je discute sur le sujet de ce message non ? lol Sinon j'ai mal compris le but de mettre des balises code actionscript et le pourquoi de commentaires sur un blog ^_^&lt;/p&gt;&lt;p&gt;Sinon t'inquiète cela va venir sur mon blog pour laisser mon framework et les classes qui vont avec &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; &lt;br /&gt;&lt;a href=&quot;http://live.burrrn.com/wiki/VEGAS&quot; rel=&quot;nofollow&quot;&gt;http://live.burrrn.com/wiki/VEGAS&lt;/a&gt;&lt;br /&gt;Mais j'attends d'avoir une version 1 stable &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt; et forcément c'est grace à des discussions comme ici que j'avance dessus hein &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;br /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - funkC</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2382</link>
    <guid isPermaLink="false">urn:md5:251aedbd595917902f1b021883bb6f9c</guid>
    <pubDate>Fri, 23 Dec 2005 11:39:26 +0000</pubDate>
    <dc:creator>funkC</dc:creator>
    
    <description>&lt;p&gt;eka laisse moi te dire que tu es un p#@~!! de gros floodeur &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; : partout où je vais sur le net je vois tes classes disséminées une à une est-ce un jeu de piste ? &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; tu ne pourrais pas sortir tes trucs une bonne foi pour toutes sur ton blog maintenant que t'en a un.&lt;/p&gt;&lt;p&gt;sinon merci lalex pour ce trick j'aime bien ;).&lt;/p&gt;&lt;p&gt;françois.&lt;br /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2381</link>
    <guid isPermaLink="false">urn:md5:00ecea0e246bf2cb3fad9219fcb1185d</guid>
    <pubDate>Thu, 22 Dec 2005 20:07:47 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;Tiens.. une autre discussion intéressante sur l'utilisation du prototype en AS3 : &lt;a href=&quot;http://groups.google.com/group/FCNG/browse_thread/thread/a572ba2c84f09578/678b382bb7814b4a#678b382bb7814b4a&quot; rel=&quot;nofollow&quot;&gt;(flexcodeurs) [AS3] augmenter les core objects&lt;/a&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2380</link>
    <guid isPermaLink="false">urn:md5:90fc5de5d1136aac80a8d682751034a7</guid>
    <pubDate>Thu, 22 Dec 2005 20:06:01 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;si mais c'est récent la connexion au googlegroup donc ce Post là n'est pas dans les archives :&lt;br /&gt;- &lt;a href=&quot;http://www.burrrn.com/projects/FCNG.html&quot; rel=&quot;nofollow&quot;&gt;http://www.burrrn.com/projects/FCNG.html&lt;/a&gt;&lt;br /&gt;- &lt;a href=&quot;http://groups.google.com/group/FCNG&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/FCNG&lt;/a&gt;&lt;br /&gt;En fait je préfère la version NG que HTML lol &lt;br /&gt;EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - neolao</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2379</link>
    <guid isPermaLink="false">urn:md5:d8a61bfab8ac2ea8689cc66dd6fc1e29</guid>
    <pubDate>Thu, 22 Dec 2005 20:00:49 +0000</pubDate>
    <dc:creator>neolao</dc:creator>
    
    <description>&lt;p&gt;ya pas version html ?&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Simuler une énumération et/ou des contantes - ekameleon</title>
    <link>http://blog.lalex.com/post/2005/12/22/Simuler-une-numration-et/ou-des-contantes#c2378</link>
    <guid isPermaLink="false">urn:md5:91430563cd089f9ba104465c23d719e2</guid>
    <pubDate>Thu, 22 Dec 2005 19:53:18 +0000</pubDate>
    <dc:creator>ekameleon</dc:creator>
    
    <description>&lt;p&gt;bah les prototypes sont pas près de disparaitre &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt; Regarde la classe Object dans la doc AS3 &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt; Tu verras même en fouillant un peu dans l'install de flexbuilder que les prototypes sont utilisés :&lt;br /&gt;&lt;code class=&quot;actionscript&quot;&gt;package flash.&lt;span style=&quot;color: #006600;&quot;&gt;errors&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;dynamic&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; IllegalOperationError &lt;span style=&quot;color: #0066CC;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;Error&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; IllegalOperationError&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0066CC;&quot;&gt;super&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
...&lt;br /&gt;
&lt;span style=&quot;color: #006600;&quot;&gt;IllegalOperationError&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;prototype&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;IllegalOperationError&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;Je te conseille d'aller voir sur le &lt;a href=&quot;news://FCNG.buRRRn.com&quot; rel=&quot;nofollow&quot;&gt;newsgroup de Flexcodeurs&lt;/a&gt; l'article : &lt;strong&gt;[AS3] tout ce que vous avez toujours voullu savoir sur AS3 &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;EKA+ &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
</channel>
</rss>