<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Armetiz - Thomas Tourlourat - CV Ingénieur Informatique &#187; Développement</title>
	<atom:link href="http://www.armetiz.info/tag/developpement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.armetiz.info</link>
	<description>Ingénieur Informatique - Lyon</description>
	<lastBuildDate>Thu, 09 Sep 2010 13:31:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google I/O : Vidéo, Android et Adobe</title>
		<link>http://www.armetiz.info/google-io-video-android-adobe/</link>
		<comments>http://www.armetiz.info/google-io-video-android-adobe/#comments</comments>
		<pubDate>Fri, 21 May 2010 08:42:25 +0000</pubDate>
		<dc:creator>Thomas Tourlourat</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[Conférence]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.armetiz.info/?p=1695</guid>
		<description><![CDATA[Pour ceux qui ne suivent pas l&#8217;actualité, Google tient en ce moment des conférences appelées Google Input/Ouput.
Format vidéo Internet
Pour le premier jour de conférence, nous avons eu droit &#8211; entre autre &#8211; à l&#8217;annonce du format vidéo WebM qui &#8211; normalement &#8211; devrai devenir le standard vidéo libre du net.
La raison de ce nouveau format, [...]]]></description>
			<content:encoded><![CDATA[<p>Pour ceux qui ne suivent pas l&#8217;actualité, Google tient en ce moment des conférences appelées <a href="http://code.google.com/intl/fr/events/io/2010/">Google Input/Ouput</a>.</p>
<h3>Format vidéo Internet</h3>
<p>Pour le premier jour de conférence, nous avons eu droit &#8211; entre autre &#8211; à l&#8217;annonce du format vidéo <a href="http://www.webmproject.org/">WebM</a> qui &#8211; normalement &#8211; devrai devenir le standard vidéo libre du net.<br />
La raison de ce nouveau format, c&#8217;est que l&#8217;utilisation du H.264 est soumise à une licence payante. A cause de cela Firefox ne pouvait pas lire les vidéos H.264&#8230;<br />
<a href="http://www.armetiz.info/wp-content/uploads/2010/05/froyo.png"><img src="http://www.armetiz.info/wp-content/uploads/2010/05/froyo.png" alt="" title="froyo" width="200" height="168" class="alignright size-full wp-image-1696" /></a></p>
<h3>Android 2.2</h3>
<p>Autre nouveauté, concernant <strong>Android</strong>.<br />
Nous avons eu la confirmation de la nouvelle version Android 2.2 nommé Froyo, qui apporte son lot d&#8217;amélioration :
<ul>
<li>Support complet de <strong>Flash Player 10.1</strong> et <strong>Adobe AIR 2.5</strong></li>
<li>2 à 5 fois plus rapide que les anciennes version grâce à un nouveau compilateur <strong>Dalvik JIT</strong></li>
<li>Navigation internet 2 à 3 fois plus rapide grâce à un nouveau moteur Javascript</li>
<li>Installation des applications sur la carte SD possible en natif</li>
<li>Mise à jour automatique des applications installées à partir du Market</li>
</ul>
<p>Pour ceux qui développent pour Android, la <a href="http://developer.android.com/sdk/android-2.2.html">version 2.2 du SDK</a> est disponible.</p>
<h3>Google TV</h3>
<p>Pour le coups, je ne vais pas m&#8217;étendre dessus, je préfère rediriger vers de l&#8217;information bien plus précise.<br />
Vous pouvez donc aller faire un tour sur le 20minutes : <a href="http://www.20minutes.fr/article/405920/High-Tech-Laborieusement-presente-Google-TV-va-t-il-revolutionner-la-tele.php">HIGH-TECH &#8211; Via Android et un processeur Intel, Google veut marier la télé et le Web. Tout le Web&#8230;</a></p>
<h3>Adobe</h3>
<p>A cette occasion, Adobe en a profité pour ouvrir l&#8217;accès à la Bêta du <a href="http://labs.adobe.com/technologies/flashplayer10/">Player Flash 10.1 pour Android</a> et à la prerelease de <a href="http://blogs.adobe.com/air/2010/05/air_android_prerelease.html">Adobe AIR pour Android</a>.</p>
<p>Alors que Adobe AIR peut s&#8217;installer sur Android 2.1, <strong>FP 10.1 doit être installé sur Android 2.2</strong>.<br />
C&#8217;est dommage car très &#8211; très &#8211; peu de gens disposent de la nouvelle version Android Froyo, mais cela annonce aussi que Google ne devrai pas tarder à mettre à jour les terminaux <img src='http://www.armetiz.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><object width="400" height="240"><param name="movie" value="http://www.youtube.com/v/yAZYSVr2Bhc&#038;hl=fr_FR&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yAZYSVr2Bhc&#038;hl=fr_FR&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="240"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.armetiz.info/google-io-video-android-adobe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Récursion infinie en Flash</title>
		<link>http://www.armetiz.info/recursion-infini-en-flash/</link>
		<comments>http://www.armetiz.info/recursion-infini-en-flash/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 08:44:19 +0000</pubDate>
		<dc:creator>Thomas Tourlourat</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Error]]></category>

		<guid isPermaLink="false">http://www.armetiz.info/?p=1392</guid>
		<description><![CDATA[
public function fooLoop &#40;&#41; : void
&#123;
   //Pre traitement
   fooLoop &#40;&#41;;
   //Post traitement
&#125;

Voici le corps d&#8217;une fonction récursive. 
Lorsque la pile est pleine, une jolie erreur du type StackOverFlowError est déclenchée.
Ce qui est intéressant de voir, c&#8217;est le comportement du Player et des navigateurs lorsque l&#8217;on traite cette erreur pour [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> fooLoop <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
   <span style="color: #009900;">//Pre traitement</span>
   fooLoop <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
   <span style="color: #009900;">//Post traitement</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Voici le corps d&#8217;une fonction <a href="http://fr.wikipedia.org/wiki/R%C3%A9cursivit%C3%A9">récursive</a>. </p>
<p>Lorsque la pile est pleine, une jolie erreur du type <a href="http://help.adobe.com/fr_FR/AS3LCR/Flash_10.0/flash/errors/StackOverflowError.html">StackOverFlowError</a> est déclenchée.</p>
<p>Ce qui est intéressant de voir, c&#8217;est le comportement du Player et des navigateurs lorsque l&#8217;on traite cette erreur pour relancer la fonction récursive.</p>
<p>Voici le code utilisé :</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application xmlns<span style="color: #000000; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
	layout=<span style="color: #990000;">&quot;absolute&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> hack <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				hack <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">click</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">try</span>
				<span style="color: #000000;">&#123;</span>
					hack <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">Error</span><span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #004993;">click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Button <span style="color: #004993;">click</span>=<span style="color: #990000;">&quot;click ()&quot;</span> label=<span style="color: #990000;">&quot;Nuked !&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Avec Windows, en utilisant IE le navigateur monte en charge en utilisant la mémoire. Ce qui a pour conséquence logique de remplir le fichier d&#8217;échange. Une fois que la mémoire disponible est sèche, un mécanisme que je n&#8217;explique pas libère de la mémoire et le script continu son exécution.</p>
<p>Contrairement à Firefox qui après 400Mo d&#8217;utilisation mémoire, se positionne en &laquo;&nbsp;Ne réponds pas&#8230;&nbsp;&raquo; et se freeze de lui même.</p>
<p>Si vous voulez voir ce que cela donne, voici l&#8217;application.<br />
Pensez à surveiller l&#8217;utilisation de votre mémoire <img src='http://www.armetiz.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />

<object width="400" height="100">
<param name="movie" value="http://www.armetiz.info/wp-content/uploads/2009/10/Recucivity.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="100" src="http://www.armetiz.info/wp-content/uploads/2009/10/Recucivity.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<h3>L&#8217;interet</h3>
<p>Outre le fait de pouvoir faire joujou, ce script peut-être intéressant pour réaliser des traitements récursifs qui sont justement trop importants.<br />
En, effet, vous pouvez le combiner à une <strong>variable statique</strong> pour continuer le traitement lorsque l&#8217;erreur de débordement est déclenchée.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.armetiz.info/recursion-infini-en-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash &#8211; Restreindre l&#8217;instanciation d&#8217;une classe par un seul objet</title>
		<link>http://www.armetiz.info/flash-restreindre-instanciation-class-objet/</link>
		<comments>http://www.armetiz.info/flash-restreindre-instanciation-class-objet/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 15:08:47 +0000</pubDate>
		<dc:creator>Thomas Tourlourat</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Conception]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Factory]]></category>
		<category><![CDATA[Pattern]]></category>

		<guid isPermaLink="false">http://www.armetiz.info/?p=1365</guid>
		<description><![CDATA[Comment restreindre l&#8217;instanciation d&#8217;une classe à une autre classe.
Voici une idée complètement &#171;&#160;crazy&#160;&#187; au quelle je vais apporter une solution à travers ce billet.
Nous allons utiliser un principe connu par de nombreux framework Web qui permet d&#8217;assurer la validité d&#8217;un formulaire: Le jeton !
L&#8217;intérêt étant de combiner cela avec le pattern Factory.

public class Master
&#123;
	private static [...]]]></description>
			<content:encoded><![CDATA[<p>Comment <strong>restreindre l&#8217;instanciation d&#8217;une classe</strong> à une autre classe.</p>
<p>Voici une idée complètement &laquo;&nbsp;crazy&nbsp;&raquo; au quelle je vais apporter une solution à travers ce billet.<br />
Nous allons utiliser un principe connu par de nombreux framework Web qui permet d&#8217;assurer la validité d&#8217;un formulaire: <strong>Le jeton</strong> !</p>
<p>L&#8217;intérêt étant de combiner cela avec le <a href="http://fr.wikipedia.org/wiki/Fabrique_%28patron_de_conception%29">pattern Factory</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Master
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> _jeton	<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">Number</span>	= <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Master<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> createSlave <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> Slave
	<span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> _tmpSlave	<span style="color: #000000; font-weight: bold;">:</span> Slave;
&nbsp;
		_jeton		= <span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">500</span>;
		_tmpSlave	= <span style="color: #0033ff; font-weight: bold;">new</span> Slave <span style="color: #000000;">&#40;</span>_jeton<span style="color: #000000;">&#41;</span>;
		_jeton		= <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">return</span> _tmpSlave;			
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> jeton <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">Number</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">return</span> _jeton;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Slave
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Slave<span style="color: #000000;">&#40;</span>_pJeton <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>Master.jeton <span style="color: #000000; font-weight: bold;">!</span>== _pJeton <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> Master.jeton <span style="color: #000000; font-weight: bold;">!</span>== <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>
			<span style="color: #0033ff; font-weight: bold;">throw</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Error</span> <span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Instanciation obligatoire par Master.createSlave&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">new</span> Slave <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">//throw Error</span>
Master.createSlave <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">//Retourne un objet du type Slave</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.armetiz.info/flash-restreindre-instanciation-class-objet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>[Flash] Convention de nommage &#8211; QUID &#171;&#160;int &amp; uint&#160;&#187;</title>
		<link>http://www.armetiz.info/convention-nommage-int-uint-actionscript/</link>
		<comments>http://www.armetiz.info/convention-nommage-int-uint-actionscript/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 12:00:09 +0000</pubDate>
		<dc:creator>Thomas Tourlourat</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Convention]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Explication]]></category>
		<category><![CDATA[Normes]]></category>

		<guid isPermaLink="false">http://www.armetiz.info/?p=1254</guid>
		<description><![CDATA[Les conventions de nommage font parties de la vie d&#8217;un développeur qui souhaite faire du bon boulot.
En effet, cela permet une meilleur compréhension visuelle. Ce qui est pratique pour détecter certains problèmes évidents.
Bref, la convention de nommage concernant les classes est celle-ci :

1ère lettre en majuscule
Mélange de minuscule, majuscule avec la première lettre de chaque [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fr.wikipedia.org/wiki/Convention_de_nommage_%28programmation%29">Les conventions de nommage</a> font parties de la vie d&#8217;un développeur qui souhaite faire du bon boulot.<br />
En effet, cela permet une <strong>meilleur compréhension visuelle</strong>. Ce qui est pratique pour détecter certains problèmes évidents.</p>
<p>Bref, la convention de nommage concernant les classes est celle-ci :
<ul>
<li>1ère lettre en majuscule</li>
<li>Mélange de minuscule, majuscule avec la première lettre de chaque mot en majuscule</li>
<li>Donner des noms simples et descriptifs</li>
<li>Éviter les acronymes : hormis ceux commum (XML, URL, HTML, &#8230;)</li>
</ul>
<h3>Analyse du contexte Flash</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> _monText <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;Hello world&quot;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> _monNombre <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">42</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> _monGrandNombre <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">int</span> = <span style="color: #004993;">int</span>.<span style="color: #004993;">MAX_VALUE</span>;</pre></div></div>

<p>En Flash, il existe deux types <strong>int</strong> et <strong>uint</strong> tout deux primitifs comme <strong>String</strong> ou <strong>Number</strong>. Ces types ont deux constantes de classe (MAX_VALUE, et MIN_VALUE).</p>
<p>Il s&#8217;agit donc de Classes, alors <strong>pourquoi la convention de nommage n&#8217;a pas été respectée</strong> ?</p>
<p>Après une recherche &#8211; très rapide grâce aux membres de mediabox &#8211; il en ressort que <em>int</em> et <em>uint </em>appartient à Number.</p>
<p>Si on analyse le code ci-dessous, on peut se rendre compte que le constructeur d&#8217;une variable de type <strong>int</strong> ou <strong>uint</strong> est <strong>Number</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> n_num<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">12.3</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>n_num<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;constructor&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// [class Number]</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> n_int<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">12</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>n_int<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;constructor&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// [class Number]</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> n_uint<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">12</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>n_uint<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;constructor&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// [class Number]</span>
&nbsp;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>n_num<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;constructor&quot;</span><span style="color: #000000;">&#93;</span> == n_int<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;constructor&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// true</span>
<span style="color: #004993;">trace</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">typeof</span> <span style="color: #000000;">&#40;</span>n_num<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #990000;">&quot; &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #0033ff; font-weight: bold;">typeof</span> <span style="color: #000000;">&#40;</span>n_int<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #990000;">&quot; &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #0033ff; font-weight: bold;">typeof</span> <span style="color: #000000;">&#40;</span>n_uint<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">//number number number</span></pre></div></div>

<p>Grâce à cette démonstration par le code, nous pouvons constater que Flash respect bien la convention de nommage sur les classes, car <strong>int</strong> et <strong>uint</strong> ne sont que de &laquo;&nbsp;simples&nbsp;&raquo; appels à <strong>Number</strong>.</p>
<p>Maintenant, QUID de la gestion mémoire ?</p>
<p>PS: Autre blog, autre temps, <a href="http://troyworks.com/blog/2007/12/02/as3-understanding-uint-int-number/">troyworks</a> s&#8217;est posé la même question sous une autre forme. Assez perturbant tout cela.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.armetiz.info/convention-nommage-int-uint-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
