<?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>Undolog.com &#187; Sviluppo</title>
	<atom:link href="http://www.undolog.com/category/sviluppo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.undolog.com</link>
	<description>Research &#38; Development  Blog</description>
	<lastBuildDate>Thu, 18 Mar 2010 14:23:31 +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>Very short trick: rendere invisibili i commenti HTML</title>
		<link>http://www.undolog.com/2010/03/18/very-short-trick-rendere-invisibili-i-commenti-html/</link>
		<comments>http://www.undolog.com/2010/03/18/very-short-trick-rendere-invisibili-i-commenti-html/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:23:31 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[Codice]]></category>
		<category><![CDATA[Commento]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2999</guid>
		<description><![CDATA[Commentare codice HTML è una prassi durante le prime fasi di sviluppo Web. Tuttavia il codice commentato rimane visibile all'interno della pagina, anche se viene ignorato dal browser. Selezionando "Visualizza Sorgente" o "Visualizza Codice" dal nostro browser, saremo sempre in grado di vederlo. I commenti in HTML si applicano utilizzando la sintassi:
PLAIN TEXT
HTML:




&#60;p&#62;Visibile&#60;/p&#62;


&#60;!--


&#160;Sono un commento


--&#62;


&#60;p&#62;Visibile&#60;/p&#62;






All'interno [...]]]></description>
			<content:encoded><![CDATA[<p>Commentare codice HTML è una prassi durante le prime fasi di sviluppo Web. Tuttavia il codice commentato <strong>rimane visibile</strong> all'interno della pagina, anche se viene ignorato dal browser. Selezionando "Visualizza Sorgente" o "Visualizza Codice" dal nostro browser, <strong>saremo sempre in grado di vederlo</strong>. I commenti in HTML si applicano utilizzando la sintassi:</p>
<div class="igBar"><span id="lhtml-4"><a href="#" onclick="javascript:showCodeTxt('html-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-4">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Visibile<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&nbsp;Sono un commento</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">--&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Visibile<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
All'interno dei marcatore <code>&lt;!--</code> e <code>--&gt;</code> è possibile inserire - quindi commentare - sezioni HTML:</p>
<div class="igBar"><span id="lhtml-5"><a href="#" onclick="javascript:showCodeTxt('html-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-5">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Visibile<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&nbsp;&lt;div class=&quot;right&quot;&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Commentato<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fdiv%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Visibile<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Come detto sopra, la parte di codice commentata, quella compresa tra le marcature <code>&lt;!--</code> e <code>--&gt;</code>, è visibile perchè inviata comunque dal web server a noi client. Il ché produce sicuramente due svantaggi:</p>
<ul>
<li>Il codice HTML è visibile, quando vorrei rimanesse <strong>nascosto</strong> perchè riguarda sezioni demo o di futura implementazione</li>
<li>Le sezioni commentate - se corpose - <strong>appesantiscono</strong> inutilmente la pagina; sono inviate ma non processate</li>
</ul>
<p>Un piccolo trucco/consiglio se si ha a disposizione un linguaggio server-side, come <strong>PHP</strong> o <strong>ASP</strong>, è quello che utilizzare le procedure di commento di questi ultimi per commentare codice HTML. Tornando agli esempi di sopra, se avete a disposizione PHP si potrebbe usare:</p>
<div class="igBar"><span id="lhtml-6"><a href="#" onclick="javascript:showCodeTxt('html-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-6">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Visibile<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php <span style="color: #66cc66;">/</span>*</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"> <a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ediv.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;right&quot;</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Commentato<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fdiv%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">*/ ?&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ep%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Visibile<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fp%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In pratica invece di usare la coppia <code>&lt;!--</code> e <code>--&gt;</code>, si usa la coppia <code>&lt;?php /*</code> e <code>*/ ?&gt;</code>.<br />
In questo caso, infatti, la pagina viene processata dal vostro server-side-language (PHP o ASP) <strong>prima di essere inviata</strong> al browser-client. Così facendo il commento PHP viene a <strong>scomparire</strong> nella nostra pagina e <strong>non inviato</strong> al browser ma, ovviamente, sempre presente nei sorgenti. <img src='http://www.undolog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;bodytext=Commentare%20codice%20HTML%20%C3%A8%20una%20prassi%20durante%20le%20prime%20fasi%20di%20sviluppo%20Web.%20Tuttavia%20il%20codice%20commentato%20rimane%20visibile%20all%27interno%20della%20pagina%2C%20anche%20se%20viene%20ignorato%20dal%20browser.%20Selezionando%20%22Visualizza%20Sorgente%22%20o%20%22Visualizza%20Codice%22%20dal%20nost" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;notes=Commentare%20codice%20HTML%20%C3%A8%20una%20prassi%20durante%20le%20prime%20fasi%20di%20sviluppo%20Web.%20Tuttavia%20il%20codice%20commentato%20rimane%20visibile%20all%27interno%20della%20pagina%2C%20anche%20se%20viene%20ignorato%20dal%20browser.%20Selezionando%20%22Visualizza%20Sorgente%22%20o%20%22Visualizza%20Codice%22%20dal%20nost" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;t=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;annotation=Commentare%20codice%20HTML%20%C3%A8%20una%20prassi%20durante%20le%20prime%20fasi%20di%20sviluppo%20Web.%20Tuttavia%20il%20codice%20commentato%20rimane%20visibile%20all%27interno%20della%20pagina%2C%20anche%20se%20viene%20ignorato%20dal%20browser.%20Selezionando%20%22Visualizza%20Sorgente%22%20o%20%22Visualizza%20Codice%22%20dal%20nost" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;headline=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Commentare%20codice%20HTML%20%C3%A8%20una%20prassi%20durante%20le%20prime%20fasi%20di%20sviluppo%20Web.%20Tuttavia%20il%20codice%20commentato%20rimane%20visibile%20all%27interno%20della%20pagina%2C%20anche%20se%20viene%20ignorato%20dal%20browser.%20Selezionando%20%22Visualizza%20Sorgente%22%20o%20%22Visualizza%20Codice%22%20dal%20nost" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;t=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F&amp;title=Very%20short%20trick%3A%20rendere%20invisibili%20i%20commenti%20HTML" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F18%2Fvery-short-trick-rendere-invisibili-i-commenti-html%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/browser/" title="browser" rel="tag">browser</a>, <a href="http://www.undolog.com/tag/codice/" title="Codice" rel="tag">Codice</a>, <a href="http://www.undolog.com/tag/commento/" title="Commento" rel="tag">Commento</a>, <a href="http://www.undolog.com/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/trick/" title="trick" rel="tag">trick</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/12/04/very-short-trick-come-centrare-elementi-sulla-pagina-anche-su-ie5/" title="Very short trick: come centrare elementi sulla pagina, anche su IE5 (4 dicembre, 2008)">Very short trick: come centrare elementi sulla pagina, anche su IE5</a> (3)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/04/26/snipplr-code-20-frammenti-snipp-di-codice-utile/" title="Snipplr code 2.0: frammenti (snipp) di codice utile (26 aprile, 2008)">Snipplr code 2.0: frammenti (snipp) di codice utile</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/02/12/nascondimi/" title="Nascondimi (12 febbraio, 2007)">Nascondimi</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/03/18/very-short-trick-rendere-invisibili-i-commenti-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very short snippet: come identificare le chiamate Ajax in PHP</title>
		<link>http://www.undolog.com/2010/03/17/very-short-snippet-come-identificare-le-chiamate-ajax-in-php/</link>
		<comments>http://www.undolog.com/2010/03/17/very-short-snippet-come-identificare-le-chiamate-ajax-in-php/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 14:52:19 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Gateway]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Snipp]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[XMLHttpRequest]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2993</guid>
		<description><![CDATA[Quando si costruisce un Gateway Ajax, cioè un file che viene richiamato dall'oggetto XmlHTTPRequest Javascript, si può involontariamente creare un tunnel per intrusioni non gradite. Essendo infatti un file come gli altri, posizionato sul nostro server, risulta raggiungibile anche dalla barra indirizzi del browser. Fortunatamente esiste un modo semplice per identificare il tipo di richiesta:
PLAIN [...]]]></description>
			<content:encoded><![CDATA[<p>Quando si costruisce un <strong>Gateway Ajax</strong>, cioè un file che viene richiamato dall'oggetto <code>XmlHTTPRequest</code> Javascript, si può involontariamente <strong>creare un tunnel</strong> per intrusioni non gradite. Essendo infatti un file come gli altri, posizionato sul nostro server, risulta raggiungibile anche dalla barra indirizzi del browser. Fortunatamente esiste un modo semplice per identificare il tipo di richiesta:</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showCodeTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_X_REQUESTED_WITH'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Chiamata dall'oggetto HTTPRequest (Ajax)</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Non fare nulla o mostra un alert</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In questo modo abbiamo impedito le chiamate dalla barra indirizzi del browser. La chicciola (@, at) non è strettamente necessaria, tuttavia, se gli header sono stati già inviati alla pagina, si potrebbe ottenere uno spiacevole Warning.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;bodytext=Quando%20si%20costruisce%20un%20Gateway%20Ajax%2C%20cio%C3%A8%20un%20file%20che%20viene%20richiamato%20dall%27oggetto%20XmlHTTPRequest%20Javascript%2C%20si%20pu%C3%B2%20involontariamente%20creare%20un%20tunnel%20per%20intrusioni%20non%20gradite.%20Essendo%20infatti%20un%20file%20come%20gli%20altri%2C%20posizionato%20sul%20nostro%20ser" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;notes=Quando%20si%20costruisce%20un%20Gateway%20Ajax%2C%20cio%C3%A8%20un%20file%20che%20viene%20richiamato%20dall%27oggetto%20XmlHTTPRequest%20Javascript%2C%20si%20pu%C3%B2%20involontariamente%20creare%20un%20tunnel%20per%20intrusioni%20non%20gradite.%20Essendo%20infatti%20un%20file%20come%20gli%20altri%2C%20posizionato%20sul%20nostro%20ser" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;t=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;annotation=Quando%20si%20costruisce%20un%20Gateway%20Ajax%2C%20cio%C3%A8%20un%20file%20che%20viene%20richiamato%20dall%27oggetto%20XmlHTTPRequest%20Javascript%2C%20si%20pu%C3%B2%20involontariamente%20creare%20un%20tunnel%20per%20intrusioni%20non%20gradite.%20Essendo%20infatti%20un%20file%20come%20gli%20altri%2C%20posizionato%20sul%20nostro%20ser" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;headline=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Quando%20si%20costruisce%20un%20Gateway%20Ajax%2C%20cio%C3%A8%20un%20file%20che%20viene%20richiamato%20dall%27oggetto%20XmlHTTPRequest%20Javascript%2C%20si%20pu%C3%B2%20involontariamente%20creare%20un%20tunnel%20per%20intrusioni%20non%20gradite.%20Essendo%20infatti%20un%20file%20come%20gli%20altri%2C%20posizionato%20sul%20nostro%20ser" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;t=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F&amp;title=Very%20short%20snippet%3A%20come%20identificare%20le%20chiamate%20Ajax%20in%20PHP" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F17%2Fvery-short-snippet-come-identificare-le-chiamate-ajax-in-php%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/internet/ajax/" title="Ajax" rel="tag">Ajax</a>, <a href="http://www.undolog.com/tag/ajax/" title="Ajax" rel="tag">Ajax</a>, <a href="http://www.undolog.com/tag/gateway/" title="Gateway" rel="tag">Gateway</a>, <a href="http://www.undolog.com/tag/http/" title="http" rel="tag">http</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/snipp/" title="Snipp" rel="tag">Snipp</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/xml/" title="xml" rel="tag">xml</a>, <a href="http://www.undolog.com/tag/xmlhttprequest/" title="XMLHttpRequest" rel="tag">XMLHttpRequest</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/12/22/very-short-trick-proxy-rss-con-simplepie/" title="Very short trick: proxy RSS con SimplePie (22 dicembre, 2008)">Very short trick: proxy RSS con SimplePie</a> (1)</li>
	<li><a href="http://www.undolog.com/2007/12/10/tunneling-e-proxy-server-per-ajax-e-non-solo/" title="Tunneling e proxy server per Ajax e non solo (10 dicembre, 2007)">Tunneling e proxy server per Ajax e non solo</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/04/26/snipplr-code-20-frammenti-snipp-di-codice-utile/" title="Snipplr code 2.0: frammenti (snipp) di codice utile (26 aprile, 2008)">Snipplr code 2.0: frammenti (snipp) di codice utile</a> (0)</li>
	<li><a href="http://www.undolog.com/2006/10/23/javascript-content-vs-php/" title="Javascript Content vs PHP (23 ottobre, 2006)">Javascript Content vs PHP</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/10/24/wordpress-come-creare-passo-passo-un-proprio-login/" title="Wordpress: come creare passo passo un proprio login (24 ottobre, 2008)">Wordpress: come creare passo passo un proprio login</a> (21)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/03/17/very-short-snippet-come-identificare-le-chiamate-ajax-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10,000 WP Thanks</title>
		<link>http://www.undolog.com/2010/03/16/10000-wp-thanks/</link>
		<comments>http://www.undolog.com/2010/03/16/10000-wp-thanks/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 14:38:48 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WP-Bannerize]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2986</guid>
		<description><![CDATA[Un bel record e una bella soddisfazione!




	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	



	Tags: Eventi &#38; Iniziative, PHP, PHP, Plugin, Plugins, Software, Sviluppo, Widget, WordPress, WordPress, WordPress MU, WP-Bannerize

	Post correlati
	
	WP Bannerize 2.4.1 (0)
	Very short snippet: Wordpress, lista categorie con checkbox (1)
	WP CleanFix 0.3.0 beta release (3)
	Wordpress: rimuovere i menu dell&#8217;amministrazione (12)
	Wordpress: modifcare AdminBigWidth per gli sviluppatori (1)


]]></description>
			<content:encoded><![CDATA[<p class="center"><a href="http://wordpress.org/extend/plugins/wp-bannerize/"><img src="http://www.undolog.com/wp-content/uploads/2010/03/Schermata-2010-03-16-a-15.30.42.png" alt="WP Bannerize" title="WP Bannerize" width="541" height="88" style="border:1px solid #aaa" /></a><br/>Un bel record e una bella soddisfazione!</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks&amp;bodytext=Un%20bel%20record%20e%20una%20bella%20soddisfazione%21" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks&amp;notes=Un%20bel%20record%20e%20una%20bella%20soddisfazione%21" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;t=10%2C000%20WP%20Thanks" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks&amp;annotation=Un%20bel%20record%20e%20una%20bella%20soddisfazione%21" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=10%2C000%20WP%20Thanks%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=10%2C000%20WP%20Thanks&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=10%2C000%20WP%20Thanks&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=10%2C000%20WP%20Thanks&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;headline=10%2C000%20WP%20Thanks&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Un%20bel%20record%20e%20una%20bella%20soddisfazione%21" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;t=10%2C000%20WP%20Thanks" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=10%2C000%20WP%20Thanks&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F&amp;title=10%2C000%20WP%20Thanks" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F16%2F10000-wp-thanks%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/plugin/" title="Plugin" rel="tag">Plugin</a>, <a href="http://www.undolog.com/tag/plugins/" title="Plugins" rel="tag">Plugins</a>, <a href="http://www.undolog.com/category/software/" title="Software" rel="tag">Software</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/widget/" title="Widget" rel="tag">Widget</a>, <a href="http://www.undolog.com/category/sviluppo/internet/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress-mu/" title="WordPress MU" rel="tag">WordPress MU</a>, <a href="http://www.undolog.com/tag/wp-bannerize/" title="WP-Bannerize" rel="tag">WP-Bannerize</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/" title="WP Bannerize 2.4.1 (3 marzo, 2010)">WP Bannerize 2.4.1</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/11/30/very-short-snippet-wordpress-lista-categorie-con-checkbox/" title="Very short snippet: Wordpress, lista categorie con checkbox (30 novembre, 2009)">Very short snippet: Wordpress, lista categorie con checkbox</a> (1)</li>
	<li><a href="http://www.undolog.com/2010/03/04/wp-cleanfix-0-3-0-beta-release/" title="WP CleanFix 0.3.0 beta release (4 marzo, 2010)">WP CleanFix 0.3.0 beta release</a> (3)</li>
	<li><a href="http://www.undolog.com/2008/11/01/wordpress-rimuovere-i-menu-dellamministrazione/" title="Wordpress: rimuovere i menu dell&#8217;amministrazione (1 novembre, 2008)">Wordpress: rimuovere i menu dell&#8217;amministrazione</a> (12)</li>
	<li><a href="http://www.undolog.com/2008/10/17/wordpress-modifcare-adminbigwidth-per-gli-sviluppatori/" title="Wordpress: modifcare AdminBigWidth per gli sviluppatori (17 ottobre, 2008)">Wordpress: modifcare AdminBigWidth per gli sviluppatori</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/03/16/10000-wp-thanks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>setAnimationDidStopSelector: usi diversi ed avanzati</title>
		<link>http://www.undolog.com/2010/03/08/setanimationdidstopselector-usi-diversi-ed-avanzati/</link>
		<comments>http://www.undolog.com/2010/03/08/setanimationdidstopselector-usi-diversi-ed-avanzati/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:42:06 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple iPhone]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[self]]></category>
		<category><![CDATA[setAnimationDelegate]]></category>
		<category><![CDATA[setAnimationDidStopSelector]]></category>
		<category><![CDATA[UIView]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2941</guid>
		<description><![CDATA[Nella maggioranza dei casi, o perchè siamo abituati o perchè l'abbiamo visto in tutorial e in alcuni testi, utilizziamo il setAnimationDidStopSelector in questa maniera:
PLAIN TEXT
Objective-C:




&#91;UIView beginAnimations:nil context:NULL&#93;;


&#91;UIView setAnimationDuration:1.5&#93;;


&#91;UIView setAnimationCurve:UIViewAnimationCurveEaseInOut&#93;;


&#91;UIView setAnimationDelegate:self&#93;;


&#91;UIView setAnimationDidStopSelector:@selector&#40;removeView&#41;&#93;;


&#160; &#160; 


myView.alpha = 0;


&#160; &#160; 


&#91;UIView commitAnimations&#93;;


&#160;


//


&#160;


- &#40;void&#41; removeView &#123;


&#160; &#160; &#91;myView removeFromSuperview&#93;;


&#125;






Nel codice sopra esposto la setAnimationDelegate imposta self come delegato e tramite [...]]]></description>
			<content:encoded><![CDATA[<p>Nella maggioranza dei casi, o perchè siamo abituati o perchè l'abbiamo visto in tutorial e in alcuni testi, utilizziamo il <code>setAnimationDidStopSelector</code> in questa maniera:</p>
<div class="igBar"><span id="lobjc-12"><a href="#" onclick="javascript:showCodeTxt('objc-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-12">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView beginAnimations<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> context<span style="color: #002200;">:</span><span style="color: #a61390;">NULL</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDuration<span style="color: #002200;">:</span>1.5<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationCurve<span style="color: #002200;">:</span>UIViewAnimationCurveEaseInOut<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDelegate<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDidStopSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>removeView<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myView.alpha <span style="color: #002200;">=</span> <span style="color: #2400d9;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView commitAnimations<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">//</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> removeView <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>myView removeFromSuperview<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Nel codice sopra esposto la <code>setAnimationDelegate</code> imposta <code>self</code> come delegato e tramite la <code>setAnimationDidStopSelector</code> gli invia un messaggio <code>removeView</code> quando l'animazione è terminata. Il codice è di per sé corretto, tuttavia fa uso di una definizione di messaggio (<code>removeView</code>) che potrebbe essere omessa. Guardate adesso lo stesso codice, con il medesimo effetto, senza il messaggio <code>removeView</code>:</p>
<div class="igBar"><span id="lobjc-13"><a href="#" onclick="javascript:showCodeTxt('objc-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-13">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView beginAnimations<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> context<span style="color: #002200;">:</span><span style="color: #a61390;">NULL</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDuration<span style="color: #002200;">:</span>1.5<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationCurve<span style="color: #002200;">:</span>UIViewAnimationCurveEaseInOut<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDelegate<span style="color: #002200;">:</span>myView<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDidStopSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>removeFromSuperview<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myView.alpha <span style="color: #002200;">=</span> <span style="color: #2400d9;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView commitAnimations<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
La cosa interessante di questo approccio è che <code>myView</code> potrebbe essere una sottoclasse di una <code>UIView</code>! Potrebbe quindi essere una nostra classe personalizzata con propri messaggi ed, nel modo esposto, tranquillamente richiamabile da <code>setAnimationDidStopSelector</code>. Inoltre, la <code>setAnimationDidStopSelector</code> accetta selettori con parametri:</p>
<div class="igBar"><span id="lobjc-14"><a href="#" onclick="javascript:showCodeTxt('objc-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-14">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView beginAnimations<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> context<span style="color: #002200;">:</span><span style="color: #a61390;">NULL</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDuration<span style="color: #002200;">:</span>1.5<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationCurve<span style="color: #002200;">:</span>UIViewAnimationCurveEaseInOut<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDelegate<span style="color: #002200;">:</span>myView<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDidStopSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>myMessage<span style="color: #002200;">:</span>param1<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myView.alpha <span style="color: #002200;">=</span> <span style="color: #2400d9;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView commitAnimations<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Questo esempio può essere esteso a tutti qui casi dove impostiamo un delegato che, atro non è, che un puntatore ad un'istanza di un oggetto qualsiasi.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;bodytext=Nella%20maggioranza%20dei%20casi%2C%20o%20perch%C3%A8%20siamo%20abituati%20o%20perch%C3%A8%20l%27abbiamo%20visto%20in%20tutorial%20e%20in%20alcuni%20testi%2C%20utilizziamo%20il%20setAnimationDidStopSelector%20in%20questa%20maniera%3A%0D%0A%5Bobjc%5D%0D%0A%5BUIView%20beginAnimations%3Anil%20context%3ANULL%5D%3B%0D%0A%5BUIView%20setAnimationDurat" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;notes=Nella%20maggioranza%20dei%20casi%2C%20o%20perch%C3%A8%20siamo%20abituati%20o%20perch%C3%A8%20l%27abbiamo%20visto%20in%20tutorial%20e%20in%20alcuni%20testi%2C%20utilizziamo%20il%20setAnimationDidStopSelector%20in%20questa%20maniera%3A%0D%0A%5Bobjc%5D%0D%0A%5BUIView%20beginAnimations%3Anil%20context%3ANULL%5D%3B%0D%0A%5BUIView%20setAnimationDurat" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;t=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;annotation=Nella%20maggioranza%20dei%20casi%2C%20o%20perch%C3%A8%20siamo%20abituati%20o%20perch%C3%A8%20l%27abbiamo%20visto%20in%20tutorial%20e%20in%20alcuni%20testi%2C%20utilizziamo%20il%20setAnimationDidStopSelector%20in%20questa%20maniera%3A%0D%0A%5Bobjc%5D%0D%0A%5BUIView%20beginAnimations%3Anil%20context%3ANULL%5D%3B%0D%0A%5BUIView%20setAnimationDurat" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;headline=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Nella%20maggioranza%20dei%20casi%2C%20o%20perch%C3%A8%20siamo%20abituati%20o%20perch%C3%A8%20l%27abbiamo%20visto%20in%20tutorial%20e%20in%20alcuni%20testi%2C%20utilizziamo%20il%20setAnimationDidStopSelector%20in%20questa%20maniera%3A%0D%0A%5Bobjc%5D%0D%0A%5BUIView%20beginAnimations%3Anil%20context%3ANULL%5D%3B%0D%0A%5BUIView%20setAnimationDurat" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;t=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F&amp;title=setAnimationDidStopSelector%3A%20usi%20diversi%20ed%20avanzati" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F08%2Fsetanimationdidstopselector-usi-diversi-ed-avanzati%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/apple-iphone/" title="Apple iPhone" rel="tag">Apple iPhone</a>, <a href="http://www.undolog.com/category/sviluppo/ipad/" title="iPad" rel="tag">iPad</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/objective-c/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/tag/selector/" title="selector" rel="tag">selector</a>, <a href="http://www.undolog.com/tag/self/" title="self" rel="tag">self</a>, <a href="http://www.undolog.com/tag/setanimationdelegate/" title="setAnimationDelegate" rel="tag">setAnimationDelegate</a>, <a href="http://www.undolog.com/tag/setanimationdidstopselector/" title="setAnimationDidStopSelector" rel="tag">setAnimationDidStopSelector</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/uiview/" title="UIView" rel="tag">UIView</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/29/iphone-creare-un-metodo-per-rispondere-agli-eventi-cross-class/" title="iPhone: creare un metodo per rispondere agli eventi cross class (29 luglio, 2009)">iPhone: creare un metodo per rispondere agli eventi cross class</a> (0)</li>
	<li><a href="http://www.undolog.com/2010/02/10/come-creare-un-proprio-protocollo-con-delegato/" title="Come creare un proprio protocollo con delegato (10 febbraio, 2010)">Come creare un proprio protocollo con delegato</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/11/21/very-short-snippet-apple-iphone-file-system/" title="Very short snippet: Apple iPhone file system (21 novembre, 2009)">Very short snippet: Apple iPhone file system</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/12/14/objective-c-esporre-proprieta-in-una-classe/" title="Objective-C: esporre proprietà in una classe (14 dicembre, 2009)">Objective-C: esporre proprietà in una classe</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/13/iphone-secondapp-indovina-il-numero-parte-2/" title="iPhone SecondApp: indovina il numero &#8211; parte 2 (13 luglio, 2009)">iPhone SecondApp: indovina il numero &#8211; parte 2</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/03/08/setanimationdidstopselector-usi-diversi-ed-avanzati/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP CleanFix 0.3.0 beta release</title>
		<link>http://www.undolog.com/2010/03/04/wp-cleanfix-0-3-0-beta-release/</link>
		<comments>http://www.undolog.com/2010/03/04/wp-cleanfix-0-3-0-beta-release/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 12:17:25 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WP CleanFix]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2968</guid>
		<description><![CDATA[WP CleanFix è un Plugin per Wordpress (compatibile anche con Wordpress MU - finchè esisterà questa distinzione) che ho scritto per ottimizzare, manutenere, pulire e sistemare il nostro Database Wordpress.

Questa è ancora una versione preliminare, tuttavia le funzioni disponibili funzionato correttamente. Ricordo che operando direttamente sul Database, prima di provare qualsiasi funzioni di eliminazione, è [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/extend/plugins/wp-cleanfix/" target="_blank">WP CleanFix</a> è un Plugin per Wordpress (compatibile anche con Wordpress MU - finchè esisterà questa distinzione) che ho scritto <strong>per ottimizzare, manutenere, pulire e sistemare</strong> il nostro Database Wordpress.</p>
<p class="center"><img style="border: 1px solid #aaa;" title="WP CleanFix" src="http://www.undolog.com/wp-content/uploads/2010/03/screenshot-1.jpg" alt="WP CleanFix" width="631" height="889" /></p>
<p>Questa è ancora una versione preliminare, tuttavia le funzioni disponibili funzionato correttamente. Ricordo che operando <strong>direttamente sul Database</strong>, prima di provare qualsiasi funzioni di <strong>eliminazione</strong>, è bene eseguire <strong>un backup del Database</strong>.</p>
<p>Le caratteristche di questa release sono:</p>
<ul>
<li>Compatibilità con <strong>Wordpress MU</strong></li>
<li>Completamente in <strong>Ajax</strong> per eseguire i controlli in modo <strong>asincrono</strong></li>
<li><strong>Localizzazione</strong> Italiano/Inglese</li>
<li>Controlla gli User Meta non utilizzati</li>
<li>Controlla/Rimuove le <strong>Revisioni dei Posts</strong></li>
<li>Controlla/Rimuove i <strong>Post Meta</strong> non utilizzati</li>
<li>Controlla/Rimuove i <strong>Tags</strong> non utilizzati</li>
<li>Controlla se esistono Posts senza un <strong>Autore</strong> valido</li>
<li>Controlla/Rimuove <strong>Categorie</strong> non utilizzate</li>
<li>Controlla/Rimuove <strong>Termini</strong> (terms) non correttamente collegati</li>
<li>Controlla/Rimuove <strong>Taxonomie</strong> (taxonomy) non correttamente collegate</li>
<li>Controlla/Rimuove i <strong>Commenti non approvati</strong>: con visualizza veloce</li>
<li>Controlla/Rimuove i <strong>Commenti SPAM</strong>: con visualizza veloce</li>
</ul>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release&amp;bodytext=WP%20CleanFix%20%C3%A8%20un%20Plugin%20per%20Wordpress%20%28compatibile%20anche%20con%20Wordpress%20MU%20-%20finch%C3%A8%20esister%C3%A0%20questa%20distinzione%29%20che%20ho%20scritto%20per%20ottimizzare%2C%20manutenere%2C%20pulire%20e%20sistemare%20il%20nostro%20Database%20Wordpress.%0D%0A%0D%0AQuesta%20%C3%A8%20ancora%20una%20versione%20prelimina" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release&amp;notes=WP%20CleanFix%20%C3%A8%20un%20Plugin%20per%20Wordpress%20%28compatibile%20anche%20con%20Wordpress%20MU%20-%20finch%C3%A8%20esister%C3%A0%20questa%20distinzione%29%20che%20ho%20scritto%20per%20ottimizzare%2C%20manutenere%2C%20pulire%20e%20sistemare%20il%20nostro%20Database%20Wordpress.%0D%0A%0D%0AQuesta%20%C3%A8%20ancora%20una%20versione%20prelimina" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;t=WP%20CleanFix%200.3.0%20beta%20release" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release&amp;annotation=WP%20CleanFix%20%C3%A8%20un%20Plugin%20per%20Wordpress%20%28compatibile%20anche%20con%20Wordpress%20MU%20-%20finch%C3%A8%20esister%C3%A0%20questa%20distinzione%29%20che%20ho%20scritto%20per%20ottimizzare%2C%20manutenere%2C%20pulire%20e%20sistemare%20il%20nostro%20Database%20Wordpress.%0D%0A%0D%0AQuesta%20%C3%A8%20ancora%20una%20versione%20prelimina" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=WP%20CleanFix%200.3.0%20beta%20release%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=WP%20CleanFix%200.3.0%20beta%20release&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=WP%20CleanFix%200.3.0%20beta%20release&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=WP%20CleanFix%200.3.0%20beta%20release&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;headline=WP%20CleanFix%200.3.0%20beta%20release&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=WP%20CleanFix%20%C3%A8%20un%20Plugin%20per%20Wordpress%20%28compatibile%20anche%20con%20Wordpress%20MU%20-%20finch%C3%A8%20esister%C3%A0%20questa%20distinzione%29%20che%20ho%20scritto%20per%20ottimizzare%2C%20manutenere%2C%20pulire%20e%20sistemare%20il%20nostro%20Database%20Wordpress.%0D%0A%0D%0AQuesta%20%C3%A8%20ancora%20una%20versione%20prelimina" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;t=WP%20CleanFix%200.3.0%20beta%20release" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=WP%20CleanFix%200.3.0%20beta%20release&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F&amp;title=WP%20CleanFix%200.3.0%20beta%20release" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F04%2Fwp-cleanfix-0-3-0-beta-release%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/database/" title="Database" rel="tag">Database</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/plugin/" title="Plugin" rel="tag">Plugin</a>, <a href="http://www.undolog.com/tag/plugins/" title="Plugins" rel="tag">Plugins</a>, <a href="http://www.undolog.com/category/software/" title="Software" rel="tag">Software</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/sviluppo/internet/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress-mu/" title="WordPress MU" rel="tag">WordPress MU</a>, <a href="http://www.undolog.com/tag/wp-cleanfix/" title="WP CleanFix" rel="tag">WP CleanFix</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/" title="WP Bannerize 2.4.1 (3 marzo, 2010)">WP Bannerize 2.4.1</a> (0)</li>
	<li><a href="http://www.undolog.com/2010/03/16/10000-wp-thanks/" title="10,000 WP Thanks (16 marzo, 2010)">10,000 WP Thanks</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/11/01/wordpress-rimuovere-i-menu-dellamministrazione/" title="Wordpress: rimuovere i menu dell&#8217;amministrazione (1 novembre, 2008)">Wordpress: rimuovere i menu dell&#8217;amministrazione</a> (12)</li>
	<li><a href="http://www.undolog.com/2009/01/28/wordpress-bugs-nellinstallazione-dei-plugins-da-un-archivio-zip/" title="Wordpress: bugs nell&rsquo;installazione dei plugins da un archivio ZIP (28 gennaio, 2009)">Wordpress: bugs nell&rsquo;installazione dei plugins da un archivio ZIP</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/06/04/un-tema-wordpress-per-tutti/" title="Un tema Wordpress per tutti (4 giugno, 2009)">Un tema Wordpress per tutti</a> (20)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/03/04/wp-cleanfix-0-3-0-beta-release/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WP Bannerize 2.4.1</title>
		<link>http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/</link>
		<comments>http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 21:37:31 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Localizzazione]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WP-Bannerize]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2958</guid>
		<description><![CDATA[Rilasciata la nuova versione 2.4.1 di WP Bannerize con supporto della localizzazione]]></description>
			<content:encoded><![CDATA[<p>Era un po' che volevo segnalarlo, visto che <a href="http://wordpress.org/extend/plugins/wp-bannerize/">WP Bannerize</a> sta per raggiungere quota <strong>10.000 Download</strong>! Ma il tempo - ultimamente - è davvero tiranno!</p>
<p class="center"><img title="WP Bannerize Download" src="http://www.undolog.com/wp-content/uploads/2010/03/Schermata-2010-03-03-a-21.33.08.png" alt="WP Bannerize Download" width="528" height="537" /></p>
<p>Ho rilasciato una nuova major release con alcune novità importanti, tra cui la <strong>localizzazione</strong> in Italiano, Inglese e in Portoghese (Brasile) - un grazie a Fernando Lopes per la spontanea, gentile e rapidissima traduzione.</p>
<p>Tra le caratteristiche di questa versione ricordo:</p>
<ul>
<li>Localizzate for Italian, English and Portuguese</li>
<li>Create your list (group/key) Banners image</li>
<li>Show your banners list by php code or Widget</li>
<li>Set random, limit and catories filters</li>
<li>Wordpress Admin Contextual HELP</li>
<li>Wordpress MU compatible</li>
</ul>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1&amp;bodytext=Rilasciata%20la%20nuova%20versione%202.4.1%20di%20WP%20Bannerize%20con%20supporto%20della%20localizzazione" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1&amp;notes=Rilasciata%20la%20nuova%20versione%202.4.1%20di%20WP%20Bannerize%20con%20supporto%20della%20localizzazione" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;t=WP%20Bannerize%202.4.1" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1&amp;annotation=Rilasciata%20la%20nuova%20versione%202.4.1%20di%20WP%20Bannerize%20con%20supporto%20della%20localizzazione" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=WP%20Bannerize%202.4.1%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=WP%20Bannerize%202.4.1&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=WP%20Bannerize%202.4.1&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=WP%20Bannerize%202.4.1&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;headline=WP%20Bannerize%202.4.1&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Rilasciata%20la%20nuova%20versione%202.4.1%20di%20WP%20Bannerize%20con%20supporto%20della%20localizzazione" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;t=WP%20Bannerize%202.4.1" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=WP%20Bannerize%202.4.1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F&amp;title=WP%20Bannerize%202.4.1" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F03%2F03%2Fwp-bannerize-2-4-1%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/featured/" title="Featured" rel="tag">Featured</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/localizzazione/" title="Localizzazione" rel="tag">Localizzazione</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/plugin/" title="Plugin" rel="tag">Plugin</a>, <a href="http://www.undolog.com/tag/plugins/" title="Plugins" rel="tag">Plugins</a>, <a href="http://www.undolog.com/category/software/" title="Software" rel="tag">Software</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/widget/" title="Widget" rel="tag">Widget</a>, <a href="http://www.undolog.com/category/sviluppo/internet/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress-mu/" title="WordPress MU" rel="tag">WordPress MU</a>, <a href="http://www.undolog.com/tag/wp-bannerize/" title="WP-Bannerize" rel="tag">WP-Bannerize</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2010/03/16/10000-wp-thanks/" title="10,000 WP Thanks (16 marzo, 2010)">10,000 WP Thanks</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/11/30/very-short-snippet-wordpress-lista-categorie-con-checkbox/" title="Very short snippet: Wordpress, lista categorie con checkbox (30 novembre, 2009)">Very short snippet: Wordpress, lista categorie con checkbox</a> (1)</li>
	<li><a href="http://www.undolog.com/2010/03/04/wp-cleanfix-0-3-0-beta-release/" title="WP CleanFix 0.3.0 beta release (4 marzo, 2010)">WP CleanFix 0.3.0 beta release</a> (3)</li>
	<li><a href="http://www.undolog.com/2008/11/01/wordpress-rimuovere-i-menu-dellamministrazione/" title="Wordpress: rimuovere i menu dell&#8217;amministrazione (1 novembre, 2008)">Wordpress: rimuovere i menu dell&#8217;amministrazione</a> (12)</li>
	<li><a href="http://www.undolog.com/2008/10/17/wordpress-modifcare-adminbigwidth-per-gli-sviluppatori/" title="Wordpress: modifcare AdminBigWidth per gli sviluppatori (17 ottobre, 2008)">Wordpress: modifcare AdminBigWidth per gli sviluppatori</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone: eliminare l&#8217;effetto ombra durante lo scroll in un UIWebView</title>
		<link>http://www.undolog.com/2010/02/25/iphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview/</link>
		<comments>http://www.undolog.com/2010/02/25/iphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 00:37:08 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Apple iPhone]]></category>
		<category><![CDATA[iMakeLove]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[TheFirst]]></category>
		<category><![CDATA[UIImageView]]></category>
		<category><![CDATA[UIWebView]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2943</guid>
		<description><![CDATA[In questo ultimo periodo ho lavorato su tre applicazioni per Apple iPhone, praticamente in contemporanea. Due sono state già approvate da Apple e si trovano su App Store: TheFirst e iMakeLove.
 
In entrambe le applicazioni ho adottato l'uso di un oggetto UIWebView per visualizzare le istruzioni.
L'oggetto UIWebView si è ilevato davvero comodo in questo caso. [...]]]></description>
			<content:encoded><![CDATA[<p>In questo ultimo periodo ho lavorato su tre applicazioni per Apple iPhone, praticamente in contemporanea. Due sono state già approvate da Apple e si trovano su App Store: <a href="http://itunes.apple.com/it/app/thefirst/id318806353?mt=8">TheFirst</a> e <a href="http://itunes.apple.com/it/app/imakelove/id353549393?mt=8">iMakeLove</a>.</p>
<p class="center"><a href="http://itunes.apple.com/it/app/thefirst/id318806353?mt=8"><img class="alignnone size-full wp-image-2945" title="TheFirst" src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-25-a-00.22.11-e1267054583121.png" alt="TheFirst" width="172" height="320" /></a> <a href="http://itunes.apple.com/it/app/imakelove/id353549393?mt=8"><img class="alignnone size-full wp-image-2946" title="iMakeLove" src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-25-a-00.32.22-e1267054545315.png" alt="iMakeLove" width="172" height="320" /></a></p>
<p>In entrambe le applicazioni ho adottato l'uso di un oggetto <code>UIWebView</code> per visualizzare le istruzioni.<br />
L'oggetto <code>UIWebView</code> si è ilevato davvero comodo in questo caso. Mi ha permesso di visualizzare in modo rapido e gradevole una testo, corredandolo in caso di immagini e qualsiasi altra cosa sia visualizzabile su una pagina Web (Flash escluso su iPhone).</p>
<p class="center"><img class="alignnone size-full wp-image-2951" title="TheFirst" src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-25-a-00.58.35-e1267056034240.png" alt="TheFirst" width="172" height="320" /></p>
<p>L'oggetto <code>UIWebView</code> è davvero versatile e necessita di pochissime impostazioni per essere utilizzato. Unico difetto riscontrato è la presenza di una misteriosa ombra che appare quando si effettua uno scroll fuori dall'area del controllo, sia in basso che in alto:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-25-a-00.23.15.png" alt="UIWebView Shadow" title="UIWebView Shadow" width="357" height="325" style="border:1px solid #aaa" /></p>
<p>Dopo varie ricerche ho capito che questo comportamento dipende dalle SDK, in particolare dagli ultimi aggiornamenti. Inoltre Apple non ha rilasciato nessuna dichiarazione ufficiale su come rimuoverlo, al contrario ha bollato come codice non permesso una serie di hack che fanno uso di funzioni riservate o non documentante. Alla fine avevo lasciato perdere, sia per questioni di tempo, sia perchè le soluzioni sembravano tutte fuori dagli schemi Apple.<br />
Fortunatamente mi è arrivata la soluzione, spero abbastanza regolare, che sembra proprio risolvere il problema (grazie ad  <a target="_blank" href="http://stackoverflow.com/users/182962/adolfo">Adolfo</a>):</p>
<div class="igBar"><span id="lobjc-16"><a href="#" onclick="javascript:showCodeTxt('objc-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-16">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// webView è il controllo UIWebView</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">id</span> scroller <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>webView.subviews objectAtIndex<span style="color: #002200;">:</span>0<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span>UIView <span style="color: #002200;">*</span>subView <span style="color: #a61390;">in</span> <span style="color: #002200;">&#91;</span>scroller subviews<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>subView class<span style="color: #002200;">&#93;</span> description<span style="color: #002200;">&#93;</span> isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;UIImageView&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; subView.hidden <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Come sottolineato da <a target="_blank" href="http://stackoverflow.com/users/182962/adolfo">Adolfo</a> questo è comunque un hack che potrebbe smettere di funzionare con futuri rilasci delle SDK.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;bodytext=In%20questo%20ultimo%20periodo%20ho%20lavorato%20su%20tre%20applicazioni%20per%20Apple%20iPhone%2C%20praticamente%20in%20contemporanea.%20Due%20sono%20state%20gi%C3%A0%20approvate%20da%20Apple%20e%20si%20trovano%20su%20App%20Store%3A%20TheFirst%20e%20iMakeLove.%0D%0A%20%0D%0AIn%20entrambe%20le%20applicazioni%20ho%20adottato%20l%27uso%20di%20un%20" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;notes=In%20questo%20ultimo%20periodo%20ho%20lavorato%20su%20tre%20applicazioni%20per%20Apple%20iPhone%2C%20praticamente%20in%20contemporanea.%20Due%20sono%20state%20gi%C3%A0%20approvate%20da%20Apple%20e%20si%20trovano%20su%20App%20Store%3A%20TheFirst%20e%20iMakeLove.%0D%0A%20%0D%0AIn%20entrambe%20le%20applicazioni%20ho%20adottato%20l%27uso%20di%20un%20" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;t=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;annotation=In%20questo%20ultimo%20periodo%20ho%20lavorato%20su%20tre%20applicazioni%20per%20Apple%20iPhone%2C%20praticamente%20in%20contemporanea.%20Due%20sono%20state%20gi%C3%A0%20approvate%20da%20Apple%20e%20si%20trovano%20su%20App%20Store%3A%20TheFirst%20e%20iMakeLove.%0D%0A%20%0D%0AIn%20entrambe%20le%20applicazioni%20ho%20adottato%20l%27uso%20di%20un%20" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;headline=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=In%20questo%20ultimo%20periodo%20ho%20lavorato%20su%20tre%20applicazioni%20per%20Apple%20iPhone%2C%20praticamente%20in%20contemporanea.%20Due%20sono%20state%20gi%C3%A0%20approvate%20da%20Apple%20e%20si%20trovano%20su%20App%20Store%3A%20TheFirst%20e%20iMakeLove.%0D%0A%20%0D%0AIn%20entrambe%20le%20applicazioni%20ho%20adottato%20l%27uso%20di%20un%20" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;t=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F&amp;title=iPhone%3A%20eliminare%20l%27effetto%20ombra%20durante%20lo%20scroll%20in%20un%20UIWebView" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F25%2Fiphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/apple/" title="Apple" rel="tag">Apple</a>, <a href="http://www.undolog.com/tag/apple-iphone/" title="Apple iPhone" rel="tag">Apple iPhone</a>, <a href="http://www.undolog.com/tag/imakelove/" title="iMakeLove" rel="tag">iMakeLove</a>, <a href="http://www.undolog.com/tag/iphone/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/tag/itunes/" title="iTunes" rel="tag">iTunes</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/thefirst/" title="TheFirst" rel="tag">TheFirst</a>, <a href="http://www.undolog.com/tag/uiimageview/" title="UIImageView" rel="tag">UIImageView</a>, <a href="http://www.undolog.com/tag/uiwebview/" title="UIWebView" rel="tag">UIWebView</a>, <a href="http://www.undolog.com/tag/web/" title="Web" rel="tag">Web</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/12/01/very-short-snippet-streaming-mp3-file-su-apple-iphone/" title="Very short snippet: streaming mp3 file su Apple iPhone (1 dicembre, 2009)">Very short snippet: streaming mp3 file su Apple iPhone</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/06/09/the-first-disponibile-su-itunes/" title="The First: disponibile su iTunes (9 giugno, 2009)">The First: disponibile su iTunes</a> (1)</li>
	<li><a href="http://www.undolog.com/2009/12/04/apple-iphone-creare-un-custom-toggle-button/" title="Apple iPhone: creare un custom toggle button (4 dicembre, 2009)">Apple iPhone: creare un custom toggle button</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/11/12/10-utili-trucchi-e-snippet-per-apple-iphone-e-xcode/" title="10 utili trucchi e snippet per Apple iPhone e Xcode (12 novembre, 2009)">10 utili trucchi e snippet per Apple iPhone e Xcode</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/02/25/iphone-eliminare-leffetto-ombra-durante-lo-scroll-in-un-uiwebview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Come localizzare immagini e viste di Interface Builder</title>
		<link>http://www.undolog.com/2010/02/23/come-localizzare-immagini-e-viste-di-interface-builder/</link>
		<comments>http://www.undolog.com/2010/02/23/come-localizzare-immagini-e-viste-di-interface-builder/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 21:41:15 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[AppleSide]]></category>
		<category><![CDATA[Immagini]]></category>
		<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[Localizzazione]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2918</guid>
		<description><![CDATA[Dopo aver illustrato come localizzare le nostre stringhe in Xcode, vediamo adesso quanto risulta semplice - applicando la medesima tecnica - localizzare immagini e viste/interfacce realizzate con Interface Builder.
Localizzare risorse grafiche
Il processo, come accennato, è il medesimo; se abbiamo un'immagine già inserita nelle nostre risorse, o ne inseriamo una nuova, e vogliamo "localizzarla" - cioè [...]]]></description>
			<content:encoded><![CDATA[<p>Dopo aver illustrato <strong><a href="http://www.appleside.it/develop/localizzare-le-applicazioni-apple-iphone-in-modo-rapido/" target="_blank">come localizzare le nostre stringhe in Xcode</a></strong>, vediamo adesso quanto risulta semplice - applicando la medesima tecnica - localizzare immagini e viste/interfacce realizzate con <strong>Interface Builder</strong>.</p>
<h4>Localizzare risorse grafiche</h4>
<p>Il processo, come accennato, è il medesimo; se abbiamo un'immagine già inserita nelle nostre risorse, o ne inseriamo una nuova, e vogliamo "localizzarla" - cioè gestire due o più immagini in base alle lingue supportate - basterà cliccare con il tasto destro sull'immagine (<code>Adium.png</code> in questo esempio) e selezionare <strong>Get Info</strong>:</p>
<p class="center"><img title="Get Info" src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-23-a-17.16.17.png" alt="" width="470" height="673" /></p>
<p>Clicchiamo <strong>Make File Localizable</strong> in basso a sinistra.</p>
<p class="center"><img class="alignnone size-full wp-image-2923" title="Localizzable" src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-23-a-17.43.54.png" alt="" width="470" height="673" /></p>
<p>Clicchiamo su <strong>Add Localization</strong> e inseriamo <code>Italian</code>:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-23-a-17.44.01.png" alt="" title="Schermata 2010-02-23 a 17.44.01" width="264" height="121" class="alignnone size-full wp-image-2924" /></p>
<p>In modo da ottenere:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-23-a-17.44.17.png" alt="" title="Schermata 2010-02-23 a 17.44.17" width="158" height="87" style="border:1px solid #aaa" /></p>
<p>La nostra immagine viene spostata (fisicamente, una delle rare volte in cui quello che accade nell'alberatura Xcode si riflette sul filesystem) sotto le cartelle virtuali <code>English.lproj</code> e <code>Italian.lproj</code> esattamente come accadeva con il testo:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-23-a-17.51.47.png" alt="" title="Schermata 2010-02-23 a 17.51.47" width="400" height="168" style="border:1px solid #aaa" /></p>
<p>A questo punto ognuna delle cartelle <code>English.lproj</code> e <code>Italian.lproj</code> contiene una stessa versione dell'immagine. Questa immagine è manipolabile all'interno di <strong>Interface Builder</strong>, dove ne vedremo - per default - la versione inglese.<br />
Arrivati a questo punto, basta sovrascrivere uno (o entrambi i file <code>Adium.png</code>) per ottenere una localizzazione delle immagini "lampo".</p>
<h4>Localizzare i file XIB</h4>
<p>Anche le interfacce costruite con <strong>Interface Builder</strong> possono essere localizzate nella loro interezza, quando lo si ritiene necessario. Il procedimento è identico a quello svolto con le risorse grafiche: aggiungiamo un <code>ViewController</code> (ad esempio <code>infoViewController</code>) con interfaccia <strong>XIB</strong>, lo selezioniamo, scegliamo <strong>Get Info</strong> dal menu contestuale, rendiamo il file localizzabile, aggiungiamo la localizzazione in italiano:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/02/Schermata-2010-02-23-a-22.30.29.png" alt="ViewController" title="ViewController" width="213" height="95" style="border:1px solid #aaa" /></p>
<p>Cliccando su <strong>English</strong> o su <strong>Italian</strong> si aprirà Interface Builder! Questa volta, sul filesystem, noteremo che sono state create due cartelle (<code>English.lproj</code> e <code>Italian.lproj</code>) all'interno della classica cartella <strong>Classes</strong>. Entrambe avranno il loro file <code>infoViewController.xib</code>. La comodità, in questo, risolta evidente nel codice; quando andremo ad istanziare il nostro controller si avrà un codice "pulito" di questo tipo:</p>
<div class="igBar"><span id="lobjc-18"><a href="#" onclick="javascript:showCodeTxt('objc-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-18">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">InfoViewController <span style="color: #002200;">*</span>info <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>InfoViewController alloc<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>self.view addSubview<span style="color: #002200;">:</span>info.view<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Come vedete non c'è traccia di nessuna dichiarazione relativa alla localizzazione, totalmente gestita da sistema. Le due interfacce, ovviamente, possono essere completamente differenti, in quanto risultano a tutti gli effetti come due file XIB separati.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;bodytext=Dopo%20aver%20illustrato%20come%20localizzare%20le%20nostre%20stringhe%20in%20Xcode%2C%20vediamo%20adesso%20quanto%20risulta%20semplice%20-%20applicando%20la%20medesima%20tecnica%20-%20localizzare%20immagini%20e%20viste%2Finterfacce%20realizzate%20con%20Interface%20Builder.%0D%0ALocalizzare%20risorse%20grafiche%0D%0AIl%20p" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;notes=Dopo%20aver%20illustrato%20come%20localizzare%20le%20nostre%20stringhe%20in%20Xcode%2C%20vediamo%20adesso%20quanto%20risulta%20semplice%20-%20applicando%20la%20medesima%20tecnica%20-%20localizzare%20immagini%20e%20viste%2Finterfacce%20realizzate%20con%20Interface%20Builder.%0D%0ALocalizzare%20risorse%20grafiche%0D%0AIl%20p" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;t=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;annotation=Dopo%20aver%20illustrato%20come%20localizzare%20le%20nostre%20stringhe%20in%20Xcode%2C%20vediamo%20adesso%20quanto%20risulta%20semplice%20-%20applicando%20la%20medesima%20tecnica%20-%20localizzare%20immagini%20e%20viste%2Finterfacce%20realizzate%20con%20Interface%20Builder.%0D%0ALocalizzare%20risorse%20grafiche%0D%0AIl%20p" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;headline=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Dopo%20aver%20illustrato%20come%20localizzare%20le%20nostre%20stringhe%20in%20Xcode%2C%20vediamo%20adesso%20quanto%20risulta%20semplice%20-%20applicando%20la%20medesima%20tecnica%20-%20localizzare%20immagini%20e%20viste%2Finterfacce%20realizzate%20con%20Interface%20Builder.%0D%0ALocalizzare%20risorse%20grafiche%0D%0AIl%20p" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;t=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F&amp;title=Come%20localizzare%20immagini%20e%20viste%20di%20Interface%20Builder" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F23%2Fcome-localizzare-immagini-e-viste-di-interface-builder%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/appleside/" title="AppleSide" rel="tag">AppleSide</a>, <a href="http://www.undolog.com/tag/immagini/" title="Immagini" rel="tag">Immagini</a>, <a href="http://www.undolog.com/tag/interface-builder/" title="Interface Builder" rel="tag">Interface Builder</a>, <a href="http://www.undolog.com/category/sviluppo/ipad/" title="iPad" rel="tag">iPad</a>, <a href="http://www.undolog.com/tag/iphone/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/tag/localizzazione/" title="Localizzazione" rel="tag">Localizzazione</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/objective-c/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a>, <a href="http://www.undolog.com/tag/xcode/" title="XCode" rel="tag">XCode</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/13/iphone-secondapp-indovina-il-numero-parte-2/" title="iPhone SecondApp: indovina il numero &#8211; parte 2 (13 luglio, 2009)">iPhone SecondApp: indovina il numero &#8211; parte 2</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/06/23/iphone-firstapp-indovina-il-numero-parte-1/" title="iPhone FirstApp: indovina il numero &#8211; parte 1 (23 giugno, 2009)">iPhone FirstApp: indovina il numero &#8211; parte 1</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/06/01/hi-phone/" title="Hi phone (1 giugno, 2009)">Hi phone</a> (7)</li>
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/23/xcode-shortcut/" title="Xcode shortcut (23 luglio, 2009)">Xcode shortcut</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/02/23/come-localizzare-immagini-e-viste-di-interface-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Come creare un proprio protocollo con delegato</title>
		<link>http://www.undolog.com/2010/02/10/come-creare-un-proprio-protocollo-con-delegato/</link>
		<comments>http://www.undolog.com/2010/02/10/come-creare-un-proprio-protocollo-con-delegato/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 10:43:54 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[@protocol]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[eventi]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[protocolli]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[self]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2896</guid>
		<description><![CDATA[Creare un proprio protocollo può essere utilissimo in una moltidudine di casi]]></description>
			<content:encoded><![CDATA[<p>Anche nei tutorial più semplici è possibile incontrare l'uso dei <strong>protocolli</strong>. Sarà certamente capitato a molti di utilizzare nel vostro view controller un <strong>protocollo</strong>, inserendo, accanto alla definzione dell'interfaccia, una dicitura simile a:</p>
<div class="igBar"><span id="lobjc-19"><a href="#" onclick="javascript:showCodeTxt('objc-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-19">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> myViewController <span style="color: #002200;">:</span> UIViewController &lt;UIWebViewDelegate&gt; <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">...</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
I protocolli (nell'esempio sopra <code><UIWebViewDelegate></code>) sono un particolare modo di <strong>Objective-C</strong> di far <strong>ereditare</strong> comportamenti di una classe in un'altra. Nell'esempio mostrato sopra il nostro view controller <em>probabilmente</em> gestisce un componente <code>UIWebView</code>. Volendo rispondere agli eventi di quest'ultimo ne incorpora il protocollo <code>UIWebViewDelegate</code>.<br />
Così, implementato il protocollo <code>UIWebViewDelegate</code> nel nostro view controller, possiamo inserire nel file .m di implementazione i metodi (messaggi) che saranno invocati dal componente <code>UIWebView</code>, come ad esempio:</p>
<div class="igBar"><span id="lobjc-20"><a href="#" onclick="javascript:showCodeTxt('objc-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-20">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>webViewDidFinishLoad<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIWebView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>webView <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// Caricamento pagina terminato</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In altre parole il nostro view controller condivide l'interfaccia <code><UIWebViewDelegate></code>, cioè ne eredita "alcune" caratteristice.</p>
<h4>Scrivere un nostro protocollo</h4>
<p>Immaginiamo di avere due classi: <code>ClasseA</code> e <code>ClasseB</code>. La classe <code>ClasseA</code> istanzia al suo interno la <code>ClasseB</code> che, a sua volta, genera un messaggio quando accade un determinato evento. Vorremo quindi scrivere un delegato per la <code>ClasseB</code> tale che possa essere utilizzato da <code>ClasseA</code> per rispondere e intercettare gli "eventi" rilasciati da <code>ClasseB</code>.<br />
La prima cosa da fare è aggiungere la definizione del protocollo nella <code>ClasseB</code> insieme ad una property (nello standard Apple) <code>delegate</code>:</p>
<div class="igBar"><span id="lobjc-21"><a href="#" onclick="javascript:showCodeTxt('objc-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-21">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@protocol</span> ClasseBDelegate &lt;NSObject&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">@optional</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>mioEvento<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> ClasseB <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// altre definizioni</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">id</span> &lt;ClasseBDelegate&gt; delegate;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>assign<span style="color: #002200;">&#41;</span> <span style="color: #a61390;">id</span> &lt;ClasseBDelegate&gt; delegate;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Come da prassi, nel file .m della <code>ClasseB</code> inserire:</p>
<div class="igBar"><span id="lobjc-22"><a href="#" onclick="javascript:showCodeTxt('objc-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-22">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@synthesize</span> delegate;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Nel file di implementazione della classe <code>ClasseB</code> possiamo inserire il "fire" del nostro evento in questo modo:</p>
<div class="igBar"><span id="lobjc-23"><a href="#" onclick="javascript:showCodeTxt('objc-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-23">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>self.delegate <span style="color: #002200;">!=</span> <span style="color: #a61390;">NULL</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">&#91;</span>self.delegate respondsToSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>mioEvento<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>delegate mioEvento<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Prima di tutto verifichiamo che sia stato impostato un <strong>delegato</strong>: <code>self.delegate != NULL</code> e che questo delegato fornisca, o possa rispondere, al messaggio <code>mioEvento</code>: <code>[self.delegate respondsToSelector:@selector(mioEvento:)]</code>. Se entrambi le condizioni sono verificate allora viene invocato <code>mioEvento</code>; in questo esempio questo evento prevede anche un parametro (<code>id</code>) che è il puntatore all'istanza della classe <code>ClassB</code>.<br />
La classe <code>ClassA</code> non dovrà far altro che implementare il <strong>delegato</strong> e inserire il metodo <code>mioEvento</code>:</p>
<div class="igBar"><span id="lobjc-24"><a href="#" onclick="javascript:showCodeTxt('objc-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-24">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &quot;ClasseB.h&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> ClasseA <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> &lt;ClasseBDelegate&gt; <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">...</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>mioEvento<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Nel file di implementazione quando creiamo la <code>ClassB</code> useremo:</p>
<div class="igBar"><span id="lobjc-25"><a href="#" onclick="javascript:showCodeTxt('objc-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-25">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ClasseB <span style="color: #002200;">*</span>classeB <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>ClasseB alloc<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>classeB setDelegate<span style="color: #002200;">:</span> self<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Poi, inseriremo:</p>
<div class="igBar"><span id="lobjc-26"><a href="#" onclick="javascript:showCodeTxt('objc-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-26">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>mioEvento<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;mioEvento&quot;</span><span style="color: #002200;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;bodytext=Creare%20un%20proprio%20protocollo%20pu%C3%B2%20essere%20utilissimo%20in%20una%20moltidudine%20di%20casi" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;notes=Creare%20un%20proprio%20protocollo%20pu%C3%B2%20essere%20utilissimo%20in%20una%20moltidudine%20di%20casi" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;t=Come%20creare%20un%20proprio%20protocollo%20con%20delegato" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;annotation=Creare%20un%20proprio%20protocollo%20pu%C3%B2%20essere%20utilissimo%20in%20una%20moltidudine%20di%20casi" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Come%20creare%20un%20proprio%20protocollo%20con%20delegato%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;headline=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Creare%20un%20proprio%20protocollo%20pu%C3%B2%20essere%20utilissimo%20in%20una%20moltidudine%20di%20casi" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;t=Come%20creare%20un%20proprio%20protocollo%20con%20delegato" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F&amp;title=Come%20creare%20un%20proprio%20protocollo%20con%20delegato" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F10%2Fcome-creare-un-proprio-protocollo-con-delegato%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/protocol/" title="@protocol" rel="tag">@protocol</a>, <a href="http://www.undolog.com/tag/apple/" title="Apple" rel="tag">Apple</a>, <a href="http://www.undolog.com/tag/class/" title="class" rel="tag">class</a>, <a href="http://www.undolog.com/tag/eventi/" title="eventi" rel="tag">eventi</a>, <a href="http://www.undolog.com/category/featured/" title="Featured" rel="tag">Featured</a>, <a href="http://www.undolog.com/category/sviluppo/ipad/" title="iPad" rel="tag">iPad</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/tag/message/" title="message" rel="tag">message</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/object/" title="Object" rel="tag">Object</a>, <a href="http://www.undolog.com/tag/objective-c/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/tag/property/" title="property" rel="tag">property</a>, <a href="http://www.undolog.com/tag/protocolli/" title="protocolli" rel="tag">protocolli</a>, <a href="http://www.undolog.com/tag/selector/" title="selector" rel="tag">selector</a>, <a href="http://www.undolog.com/tag/self/" title="self" rel="tag">self</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/29/iphone-creare-un-metodo-per-rispondere-agli-eventi-cross-class/" title="iPhone: creare un metodo per rispondere agli eventi cross class (29 luglio, 2009)">iPhone: creare un metodo per rispondere agli eventi cross class</a> (0)</li>
	<li><a href="http://www.undolog.com/2010/03/08/setanimationdidstopselector-usi-diversi-ed-avanzati/" title="setAnimationDidStopSelector: usi diversi ed avanzati (8 marzo, 2010)">setAnimationDidStopSelector: usi diversi ed avanzati</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/10/29/objective-c-nslog-su-struct-c/" title="Objective-C: NSLog() su struct C (29 ottobre, 2009)">Objective-C: NSLog() su struct C</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/23/xcode-shortcut/" title="Xcode shortcut (23 luglio, 2009)">Xcode shortcut</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/02/10/come-creare-un-proprio-protocollo-con-delegato/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress: filtrate il contenuto dei commenti</title>
		<link>http://www.undolog.com/2010/02/06/wordpress-filtrate-il-contenuto-dei-commenti/</link>
		<comments>http://www.undolog.com/2010/02/06/wordpress-filtrate-il-contenuto-dei-commenti/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 23:30:16 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[add_filter()]]></category>
		<category><![CDATA[Commento]]></category>
		<category><![CDATA[comment_text]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[get_comment_text]]></category>
		<category><![CDATA[strlen()]]></category>
		<category><![CDATA[substr()]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2888</guid>
		<description><![CDATA[Mi è capitato di dover sistemare un fastidioso problema su un blog Wordpress: gli utenti lasciavano commenti con frasi lunghissime. Questo produceva la fuoriuscita del testo, sia nel backend che, ancor peggio, nel frontend. L'effetto era davvero orribile e, onde evitare di moderare a mano ogni singolo commento, l'unica soluzione era quella di filtrare - [...]]]></description>
			<content:encoded><![CDATA[<p>Mi è capitato di dover sistemare un fastidioso problema su un blog Wordpress: gli utenti lasciavano commenti con frasi lunghissime. Questo produceva la fuoriuscita del testo, sia nel backend che, ancor peggio, nel frontend. L'effetto era davvero orribile e, onde evitare di moderare a mano ogni singolo commento, l'unica soluzione era quella di filtrare - in qualche modo - l'output dei commenti.<br />
Fortunatamente (ed è una delle ragione per cui tutto sommato adoro WP) Wordpress permette di aggiungere un filtro all'output dei commenti. Nel mio caso è bastato aggiungere nel file <code>functions.php</code> le seguenti righe di codice:</p>
<div class="igBar"><span id="lphp-28"><a href="#" onclick="javascript:showCodeTxt('php-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-28">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> filter_comment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$word</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$word</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span> 20<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$word</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$word</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;color:#800000;">20</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;[t...]&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$word</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$word</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_text'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'filter_comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'get_comment_text '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'filter_comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Le parole troppo lunghe (maggiori di 20) vengono tagliate e, alla fine, gli aggiungo <code>[t...]</code> - per indicare che è una parola tagliata.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;bodytext=Mi%20%C3%A8%20capitato%20di%20dover%20sistemare%20un%20fastidioso%20problema%20su%20un%20blog%20Wordpress%3A%20gli%20utenti%20lasciavano%20commenti%20con%20frasi%20lunghissime.%20Questo%20produceva%20la%20fuoriuscita%20del%20testo%2C%20sia%20nel%20backend%20che%2C%20ancor%20peggio%2C%20nel%20frontend.%20L%27effetto%20era%20davvero%20orr" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;notes=Mi%20%C3%A8%20capitato%20di%20dover%20sistemare%20un%20fastidioso%20problema%20su%20un%20blog%20Wordpress%3A%20gli%20utenti%20lasciavano%20commenti%20con%20frasi%20lunghissime.%20Questo%20produceva%20la%20fuoriuscita%20del%20testo%2C%20sia%20nel%20backend%20che%2C%20ancor%20peggio%2C%20nel%20frontend.%20L%27effetto%20era%20davvero%20orr" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;t=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;annotation=Mi%20%C3%A8%20capitato%20di%20dover%20sistemare%20un%20fastidioso%20problema%20su%20un%20blog%20Wordpress%3A%20gli%20utenti%20lasciavano%20commenti%20con%20frasi%20lunghissime.%20Questo%20produceva%20la%20fuoriuscita%20del%20testo%2C%20sia%20nel%20backend%20che%2C%20ancor%20peggio%2C%20nel%20frontend.%20L%27effetto%20era%20davvero%20orr" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;headline=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Mi%20%C3%A8%20capitato%20di%20dover%20sistemare%20un%20fastidioso%20problema%20su%20un%20blog%20Wordpress%3A%20gli%20utenti%20lasciavano%20commenti%20con%20frasi%20lunghissime.%20Questo%20produceva%20la%20fuoriuscita%20del%20testo%2C%20sia%20nel%20backend%20che%2C%20ancor%20peggio%2C%20nel%20frontend.%20L%27effetto%20era%20davvero%20orr" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;t=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F&amp;title=Wordpress%3A%20filtrate%20il%20contenuto%20dei%20commenti" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F06%2Fwordpress-filtrate-il-contenuto-dei-commenti%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/add_filter/" title="add_filter()" rel="tag">add_filter()</a>, <a href="http://www.undolog.com/tag/commento/" title="Commento" rel="tag">Commento</a>, <a href="http://www.undolog.com/tag/comment_text/" title="comment_text" rel="tag">comment_text</a>, <a href="http://www.undolog.com/tag/content/" title="content" rel="tag">content</a>, <a href="http://www.undolog.com/tag/functionsphp/" title="functions.php" rel="tag">functions.php</a>, <a href="http://www.undolog.com/tag/get_comment_text/" title="get_comment_text" rel="tag">get_comment_text</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/strlen/" title="strlen()" rel="tag">strlen()</a>, <a href="http://www.undolog.com/tag/substr/" title="substr()" rel="tag">substr()</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/sviluppo/internet/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/03/wordpress-usare-gli-shortcodes/" title="Wordpress: usare gli shortcodes (3 luglio, 2009)">Wordpress: usare gli shortcodes</a> (5)</li>
	<li><a href="http://www.undolog.com/2009/01/16/wordpress-functionsphp-qualche-funzione-utile/" title="Wordpress: functions.php, qualche funzione utile (16 gennaio, 2009)">Wordpress: functions.php, qualche funzione utile</a> (0)</li>
	<li><a href="http://www.undolog.com/2010/01/26/wordpress-estendere-le-informazioni-utente/" title="Wordpress: estendere le informazioni utente (26 gennaio, 2010)">Wordpress: estendere le informazioni utente</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/11/30/very-short-snippet-wordpress-lista-categorie-con-checkbox/" title="Very short snippet: Wordpress, lista categorie con checkbox (30 novembre, 2009)">Very short snippet: Wordpress, lista categorie con checkbox</a> (1)</li>
	<li><a href="http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/" title="WP Bannerize 2.4.1 (3 marzo, 2010)">WP Bannerize 2.4.1</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/02/06/wordpress-filtrate-il-contenuto-dei-commenti/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Very short snippet: ottenere l&#8217;output di un URL in Objective-C</title>
		<link>http://www.undolog.com/2010/02/05/very-short-snippet-ottenere-loutput-di-un-url-in-objective-c/</link>
		<comments>http://www.undolog.com/2010/02/05/very-short-snippet-ottenere-loutput-di-un-url-in-objective-c/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 00:23:41 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[NSString]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Snipp]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[stringWithContentsOfURL]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2879</guid>
		<description><![CDATA[Avrei forse dovuto scrivere "Very very very, short snippet", tuttavia è un ottimo e comodissimo "trucchetto" questo che sto per mostrare. Eseguendo le "due" righe di codice indicate qui sotto, è possibile ottenere l'output di qualsiasi URL e manipolarlo.
PLAIN TEXT
Objective-C:




NSString *url = &#91;NSString stringWithFormat:@&#34;http://www.appleside.it/&#34;&#93;;


NSString *result = &#91;NSString stringWithContentsOfURL:&#91;NSURL URLWithString:url&#93;


&#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Avrei forse dovuto scrivere "Very very very, short snippet", tuttavia è un ottimo e comodissimo "trucchetto" questo che sto per mostrare. Eseguendo le "due" righe di codice indicate qui sotto, è possibile ottenere l'output di qualsiasi URL e manipolarlo.</p>
<div class="igBar"><span id="lobjc-31"><a href="#" onclick="javascript:showCodeTxt('objc-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-31">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://www.appleside.it/&quot;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> stringWithContentsOfURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"><span style="color: #400080;">NSURL</span></a> URLWithString<span style="color: #002200;">:</span>url<span style="color: #002200;">&#93;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; encoding<span style="color: #002200;">:</span>NSASCIIStringEncoding </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Read from : %@ = &quot;</span>,apiEndpoint, result<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Ad esempio potremmo sfruttare molti servizi <strong>API REST</strong> per risolvere svariate problematiche. Tanto per fare un esempio pratico, immaginiamo di volre "comprimere"(trim) l'url http://www.undolog.com, come fanno molti servizi come <strong>Twitter</strong>, <strong>FriendFeed</strong> o <strong>Facebook</strong>. Ebbene potremmo sfruttare questo semplice codice:</p>
<div class="igBar"><span id="lobjc-32"><a href="#" onclick="javascript:showCodeTxt('objc-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-32">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>url <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://www.undolog.com&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>apiRest <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://api.tr.im/v1/trim_simple?url=%@&quot;</span>,url<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> stringWithContentsOfURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"><span style="color: #400080;">NSURL</span></a> URLWithString<span style="color: #002200;">:</span>apiEndpoint<span style="color: #002200;">&#93;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; encoding<span style="color: #002200;">:</span>NSASCIIStringEncoding </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;URL Originale: %@ - URL Compresso: %@&quot;</span>,url, result<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Tutto il merito, ovviamente, è del metodo <strong><code>stringWithContentsOfURL</code></strong>: in quanto permette di caricare in una stringa il contenuto (output) di un URL.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;bodytext=Avrei%20forse%20dovuto%20scrivere%20%22Very%20very%20very%2C%20short%20snippet%22%2C%20tuttavia%20%C3%A8%20un%20ottimo%20e%20comodissimo%20%22trucchetto%22%20questo%20che%20sto%20per%20mostrare.%20Eseguendo%20le%20%22due%22%20righe%20di%20codice%20indicate%20qui%20sotto%2C%20%C3%A8%20possibile%20ottenere%20l%27output%20di%20qualsiasi%20URL%20e%20manipo" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;notes=Avrei%20forse%20dovuto%20scrivere%20%22Very%20very%20very%2C%20short%20snippet%22%2C%20tuttavia%20%C3%A8%20un%20ottimo%20e%20comodissimo%20%22trucchetto%22%20questo%20che%20sto%20per%20mostrare.%20Eseguendo%20le%20%22due%22%20righe%20di%20codice%20indicate%20qui%20sotto%2C%20%C3%A8%20possibile%20ottenere%20l%27output%20di%20qualsiasi%20URL%20e%20manipo" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;t=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;annotation=Avrei%20forse%20dovuto%20scrivere%20%22Very%20very%20very%2C%20short%20snippet%22%2C%20tuttavia%20%C3%A8%20un%20ottimo%20e%20comodissimo%20%22trucchetto%22%20questo%20che%20sto%20per%20mostrare.%20Eseguendo%20le%20%22due%22%20righe%20di%20codice%20indicate%20qui%20sotto%2C%20%C3%A8%20possibile%20ottenere%20l%27output%20di%20qualsiasi%20URL%20e%20manipo" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;headline=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Avrei%20forse%20dovuto%20scrivere%20%22Very%20very%20very%2C%20short%20snippet%22%2C%20tuttavia%20%C3%A8%20un%20ottimo%20e%20comodissimo%20%22trucchetto%22%20questo%20che%20sto%20per%20mostrare.%20Eseguendo%20le%20%22due%22%20righe%20di%20codice%20indicate%20qui%20sotto%2C%20%C3%A8%20possibile%20ottenere%20l%27output%20di%20qualsiasi%20URL%20e%20manipo" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;t=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F&amp;title=Very%20short%20snippet%3A%20ottenere%20l%27output%20di%20un%20URL%20in%20Objective-C" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F02%2F05%2Fvery-short-snippet-ottenere-loutput-di-un-url-in-objective-c%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/api/" title="api" rel="tag">api</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/nsstring/" title="NSString" rel="tag">NSString</a>, <a href="http://www.undolog.com/tag/objective-c/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/tag/rest/" title="REST" rel="tag">REST</a>, <a href="http://www.undolog.com/tag/snipp/" title="Snipp" rel="tag">Snipp</a>, <a href="http://www.undolog.com/tag/snippets/" title="Snippets" rel="tag">Snippets</a>, <a href="http://www.undolog.com/tag/stringwithcontentsofurl/" title="stringWithContentsOfURL" rel="tag">stringWithContentsOfURL</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/10/09/very-short-snippet-iphone-numeri-casuali/" title="Very short snippet: iPhone, numeri casuali (9 ottobre, 2009)">Very short snippet: iPhone, numeri casuali</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/11/19/very-short-snippet-wordpress-separare-le-categorie-in-due-colonne/" title="Very short snippet: Wordpress, separare le categorie in due colonne (19 novembre, 2008)">Very short snippet: Wordpress, separare le categorie in due colonne</a> (1)</li>
	<li><a href="http://www.undolog.com/2009/09/07/very-short-snippet-wordpress-migliorare-il-campo-cerca/" title="Very short snippet: Wordpress, migliorare il campo cerca (7 settembre, 2009)">Very short snippet: Wordpress, migliorare il campo cerca</a> (3)</li>
	<li><a href="http://www.undolog.com/2008/11/03/very-short-snippet-wordpress-administrator/" title="Very short snippet: Wordpress administrator? (3 novembre, 2008)">Very short snippet: Wordpress administrator?</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/10/31/very-short-snippet-php-plain-date/" title="Very short snippet: PHP plain date (31 ottobre, 2008)">Very short snippet: PHP plain date</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/02/05/very-short-snippet-ottenere-loutput-di-un-url-in-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppleSide: iPad, Apple e molto altro</title>
		<link>http://www.undolog.com/2010/01/28/appleside-ipad-apple-e-molto-altro/</link>
		<comments>http://www.undolog.com/2010/01/28/appleside-ipad-apple-e-molto-altro/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 09:53:14 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[AppleSide]]></category>
		<category><![CDATA[Develop]]></category>
		<category><![CDATA[Magazine]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2861</guid>
		<description><![CDATA[Nasce il nuovo magazine dedicato all'universo Apple e al nuovo iPad]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.appleside.it" target="_blank">AppleSide</a> è il nuovo magazine targato <a href="http://www.saidmade.com" target="_blank">Saidmade</a> dedicato all'universo Apple, presentato a ridosso della presentazione del nuovo <strong>Apple iPad</strong>. Sul magazine - con una taglio professionale - troverete moltissime news ed info dedicate alla mela morsicata: tra cui una sezione tutta dedicata al nuovissimo <strong>iPad</strong>! Inoltre sarà presente una sezione tutta dedicata allo sviluppo, curata dal sottoscritto. Con l'occasione, inauguro anche una nuova categoria qui su undolog, dedicata appunto all'Apple iPad. Sono riuscito già a provare le nuove SDK 3.2 beta - a causa della <acronym title="Nondisclosure agreement">NDA</acronym> vi posso svelare davvero poco - tuttavia vi consiglio di leggere <em><a href="http://www.appleside.it/develop/ipad-sdk-3-2-installazione-novita-prima-prova/" target="_blank">iPad SDK 3.2: installazione, novità, prima prova</a></em>, dove qualcosina sono riuscito a mostrare.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;bodytext=Nasce%20il%20nuovo%20magazine%20dedicato%20all%27universo%20Apple%20e%20al%20nuovo%20iPad" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;notes=Nasce%20il%20nuovo%20magazine%20dedicato%20all%27universo%20Apple%20e%20al%20nuovo%20iPad" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;t=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;annotation=Nasce%20il%20nuovo%20magazine%20dedicato%20all%27universo%20Apple%20e%20al%20nuovo%20iPad" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;headline=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Nasce%20il%20nuovo%20magazine%20dedicato%20all%27universo%20Apple%20e%20al%20nuovo%20iPad" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;t=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F&amp;title=AppleSide%3A%20iPad%2C%20Apple%20e%20molto%20altro" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F28%2Fappleside-ipad-apple-e-molto-altro%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/apple/" title="Apple" rel="tag">Apple</a>, <a href="http://www.undolog.com/tag/appleside/" title="AppleSide" rel="tag">AppleSide</a>, <a href="http://www.undolog.com/tag/develop/" title="Develop" rel="tag">Develop</a>, <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/featured/" title="Featured" rel="tag">Featured</a>, <a href="http://www.undolog.com/category/sviluppo/ipad/" title="iPad" rel="tag">iPad</a>, <a href="http://www.undolog.com/tag/ipad/" title="iPad" rel="tag">iPad</a>, <a href="http://www.undolog.com/tag/magazine/" title="Magazine" rel="tag">Magazine</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/20/xcode-consigli-sul-debugging-preferences/" title="XCode: consigli sul Debugging Preferences (20 luglio, 2009)">XCode: consigli sul Debugging Preferences</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/23/xcode-shortcut/" title="Xcode shortcut (23 luglio, 2009)">Xcode shortcut</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/01/26/windows-vista-caro-prezzi/" title="Windows Vista: caro prezzi (26 gennaio, 2007)">Windows Vista: caro prezzi</a> (1)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/28/appleside-ipad-apple-e-molto-altro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Come selezionare un gruppo di tag che non hanno figli di un certo tipo</title>
		<link>http://www.undolog.com/2010/01/26/come-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo/</link>
		<comments>http://www.undolog.com/2010/01/26/come-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 15:09:15 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[addClass()]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[each()]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[NOT]]></category>
		<category><![CDATA[Snipp]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[_blank]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2852</guid>
		<description><![CDATA[jQuery è giunto alla versione 1.4! Oltre a varie nuove features e la "solita" riscrittura del codice, tutta la documentazione è stata rivista in maniera davvero più leggibile rispetto a prima. Ma vediamo alla questione di questo post; problema: aggiungere, tramite jQuery, una classe a tutti i tag a che possiedono l'attributo target impostato a [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://jquery.com">jQuery</a> è giunto alla <strong>versione 1.4</strong>! Oltre a varie nuove features e la "solita" riscrittura del codice, tutta la <a target="_blank" href="http://api.jquery.com">documentazione</a> è stata rivista in maniera davvero più leggibile rispetto a prima. Ma vediamo alla questione di questo post; <strong>problema</strong>: aggiungere, tramite jQuery, una classe a tutti i tag <code>a</code> che possiedono l'attributo <code>target</code> impostato a <code>_blank</code>!<br />
Questo l'avevamo già visto in <em><a href="://www.undolog.com/2008/12/15/very-short-snippet-jquery-auto-target-blank-link/">Very short snippet: jQuery auto target blank link</a></em>. La questione è che spesso anche le immagini hanno un link ad una nuova finestra e aggiungere un'ulteriore immagine al bordo non è molto bello. Per far in modo che su particolare link non venga applicata la classe esistono due modi:</p>
<h4>Aggiungere una classe</h4>
<p>Il primo metodo, che vale con qualsiasi link, è quello di aggiungere una classe, ad esempio <code>noexternal</code>, a tutti quei link che, nonostante contengono l'attributo <code>target="_blank"</code>, non vogliamo mostrino l'immagine. In pratica vogliamo far in modo che jQuery non li prenda in considerazione.</p>
<div class="igBar"><span id="ljavascript-36"><a href="#" onclick="javascript:showCodeTxt('javascript-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-36">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a[target=_blank]'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">not</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.noexternal'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'external'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Questo meotdo, seppur efficace, costringe comunque ad inserire nel link che vogliamo escludere la classe <code>noexternal</code>:</p>
<div class="igBar"><span id="lhtml-37"><a href="#" onclick="javascript:showCodeTxt('html-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-37">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ea.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blank&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.undolog.com&quot;</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Link esterno con immagine<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fa%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ea.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blank&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;noexternal&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.appleside.it&quot;</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Link esterno senza immagine<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fa%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Usare un ciclo each()</h4>
<p>In alternativa, per disabilitare l'uso della classe external su tutti quei link che contengono un'immagine, possiamo usare:</p>
<div class="igBar"><span id="ljavascript-38"><a href="#" onclick="javascript:showCodeTxt('javascript-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-38">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a[target=_blank]:not(.noexternal)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> me <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span>me<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">&gt;</span> <span style="color: #CC0000;color:#800000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$<span style="color: #009900;">&#40;</span>me<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'external'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Questa svolge la medesima funzione di quella precedente con l'aggiunta della verifica se il "primo" figlio è un'immagine. In caso affermativo la classe <code>external</code> non viene aggiunta al tag <code>a</code>.<br />
Sarebbe interessante capire se esiste un metodo per fare la stessa cosa senza usare un "ciclo" <code>each()</code>!</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;bodytext=jQuery%20%C3%A8%20giunto%20alla%20versione%201.4%21%20Oltre%20a%20varie%20nuove%20features%20e%20la%20%22solita%22%20riscrittura%20del%20codice%2C%20tutta%20la%20documentazione%20%C3%A8%20stata%20rivista%20in%20maniera%20davvero%20pi%C3%B9%20leggibile%20rispetto%20a%20prima.%20Ma%20vediamo%20alla%20questione%20di%20questo%20post%3B%20problema%3A%20ag" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;notes=jQuery%20%C3%A8%20giunto%20alla%20versione%201.4%21%20Oltre%20a%20varie%20nuove%20features%20e%20la%20%22solita%22%20riscrittura%20del%20codice%2C%20tutta%20la%20documentazione%20%C3%A8%20stata%20rivista%20in%20maniera%20davvero%20pi%C3%B9%20leggibile%20rispetto%20a%20prima.%20Ma%20vediamo%20alla%20questione%20di%20questo%20post%3B%20problema%3A%20ag" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;t=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;annotation=jQuery%20%C3%A8%20giunto%20alla%20versione%201.4%21%20Oltre%20a%20varie%20nuove%20features%20e%20la%20%22solita%22%20riscrittura%20del%20codice%2C%20tutta%20la%20documentazione%20%C3%A8%20stata%20rivista%20in%20maniera%20davvero%20pi%C3%B9%20leggibile%20rispetto%20a%20prima.%20Ma%20vediamo%20alla%20questione%20di%20questo%20post%3B%20problema%3A%20ag" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;headline=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=jQuery%20%C3%A8%20giunto%20alla%20versione%201.4%21%20Oltre%20a%20varie%20nuove%20features%20e%20la%20%22solita%22%20riscrittura%20del%20codice%2C%20tutta%20la%20documentazione%20%C3%A8%20stata%20rivista%20in%20maniera%20davvero%20pi%C3%B9%20leggibile%20rispetto%20a%20prima.%20Ma%20vediamo%20alla%20questione%20di%20questo%20post%3B%20problema%3A%20ag" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;t=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F&amp;title=Come%20selezionare%20un%20gruppo%20di%20tag%20che%20non%20hanno%20figli%20di%20un%20certo%20tipo" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fcome-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/addclass/" title="addClass()" rel="tag">addClass()</a>, <a href="http://www.undolog.com/tag/class/" title="class" rel="tag">class</a>, <a href="http://www.undolog.com/category/sviluppo/internet/css/" title="CSS" rel="tag">CSS</a>, <a href="http://www.undolog.com/tag/each/" title="each()" rel="tag">each()</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/jquery/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/jquery-javascript-internet-sviluppo/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.undolog.com/tag/link/" title="link" rel="tag">link</a>, <a href="http://www.undolog.com/tag/not/" title="NOT" rel="tag">NOT</a>, <a href="http://www.undolog.com/tag/snipp/" title="Snipp" rel="tag">Snipp</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/target/" title="target" rel="tag">target</a>, <a href="http://www.undolog.com/tag/_blank/" title="_blank" rel="tag">_blank</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/12/15/very-short-snippet-jquery-auto-target-blank-link/" title="Very short snippet: jQuery auto target blank link (15 dicembre, 2008)">Very short snippet: jQuery auto target blank link</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/02/09/wordpress-personalizzare-la-navigazione-tra-i-post/" title="Wordpress: personalizzare la navigazione tra i post (9 febbraio, 2009)">Wordpress: personalizzare la navigazione tra i post</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/10/17/wordpress-modifcare-adminbigwidth-per-gli-sviluppatori/" title="Wordpress: modifcare AdminBigWidth per gli sviluppatori (17 ottobre, 2008)">Wordpress: modifcare AdminBigWidth per gli sviluppatori</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/10/22/wordpress-migliorare-la-lista-dei-commenti/" title="Wordpress: migliorare la lista dei commenti (22 ottobre, 2008)">Wordpress: migliorare la lista dei commenti</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/07/02/wordpress-eliminare-i-post-duplicati-nei-loop-multipli/" title="Wordpress: eliminare i post duplicati nei loop multipli (2 luglio, 2009)">Wordpress: eliminare i post duplicati nei loop multipli</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/26/come-selezionare-un-gruppo-di-tag-che-non-hanno-figli-di-un-certo-tipo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress: estendere le informazioni utente</title>
		<link>http://www.undolog.com/2010/01/26/wordpress-estendere-le-informazioni-utente/</link>
		<comments>http://www.undolog.com/2010/01/26/wordpress-estendere-le-informazioni-utente/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 23:18:54 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[add_action()]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[get_the_author_meta()]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[the_author_meta()]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2842</guid>
		<description><![CDATA[Le informazioni su un utente, o autore, di un blog Wordpress possono essere estese in modo semplice. Potrebbe ad esempio essere utile inserire la data di nascita, delle informazioni bibliografiche, l'indirizzo della sede di lavoro o, estremamente comodo, un campo per dei permessi speciali - da controllare in seguito nel template.
L'operazione che ci accingiamo a [...]]]></description>
			<content:encoded><![CDATA[<p>Le informazioni su un utente, o autore, di un blog Wordpress possono essere <strong>estese</strong> in modo semplice. Potrebbe ad esempio essere utile inserire la data di nascita, delle informazioni bibliografiche, l'indirizzo della sede di lavoro o, estremamente comodo, un campo per dei <strong>permessi speciali</strong> - da controllare in seguito nel template.<br />
L'operazione che ci accingiamo a fare non necessita di un Plugin, ma il codice che serve può essere posizionato nel - consueto - file <code>functions.php</code>.</p>
<blockquote><p><strong>Nota</strong>: per situazioni più articolate l'uso di un Plugin potrebbe essere la scelta migliore. Agendo sul file <code>functions.php</code> leghiamo il nostro codice al tema. Un Plugin, soprattutto se il codice scritto è "abbondante", risulta di più facile riutilizzo.</p></blockquote>
<p>Apriamo dunque il file <code>functions.php</code> e iniziamo scrivendo il codice che visualizzerà il nostro campo aggiuntivo nell'amministrazione utente di Wordpress:</p>
<div class="igBar"><span id="lphp-42"><a href="#" onclick="javascript:showCodeTxt('php-42'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-42">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">// Questa funzione - vedi add_action() più sotto, si occupa di visualizzare</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">// il nostro campo aggiuntiva nell'amministrazione di Wordpress</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">function nuovo_user_meta($user) { ?&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;h3&gt;Campi aggiuntivi&lt;/h3&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;table class=&quot;form-table&quot;&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;th&gt;&lt;label for=&quot;nuovo_user_meta&quot;&gt;Nuovo Campo&lt;/label&gt;&lt;/th&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;nuovo_user_meta&quot; id=&quot;nuovo_user_meta&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> esc_attr<span style="color: #009900;">&#40;</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'nuovo_user_meta'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; class=&quot;regular-text&quot; /&gt;&lt;br /&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span class=&quot;description&quot;&gt;Inserisci il tuo campo aggiuntivo.&lt;/span&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// Aggiungiamo la nostra funzione all'amministrazione di Wordpress</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// in questo &quot;semplice&quot; caso, la funzione &quot;mostra&quot; (show_user_profile)</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// e quella di &quot;modifica&quot; (edit_user_profile) coincidono, ma in casi</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// più articolati potrebbero essere differenti</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'show_user_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuovo_user_meta'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuovo_user_meta'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Andando a sbirciare nell'amministrazione, selezionando il vostro utente, troverete già il nuovo campo. Tuttavia per adesso il nuovo campo è solo visualizzato, ma basteranno poche altre righe di codice per gestire la sua memorizzazione:</p>
<div class="igBar"><span id="lphp-43"><a href="#" onclick="javascript:showCodeTxt('php-43'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-43">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// Memorizza, per l'utente $user_id, un nuovo campo identificato come</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// 'nuovo_user_meta'</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> nuovo_user_meta_update<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// solo chi ha i permessi di editing </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/* Copy and paste this line for additional fields. Make sure to change 'twitter' to the field ID. */</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuovo_user_meta'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nuovo_user_meta'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// Anche in questo caso ci avvaliamo della add_action() per aggiungere</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// il nostro pezzo di codice. Notate che permettiamo l'aggiornamento</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// sia all'utente che visualizza il proprio profilo (personal_options_update) </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// che a qualsiasi utente amministratore o che ha i permessi di edit (edit_user_profile_update)</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'personal_options_update'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuovo_user_meta_update'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user_profile_update'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuovo_user_meta_update'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
A questo punto il nostro campo aggiuntivo è completo e non resta altro che utilizzarlo. Per recuperare un campo di questo tipo è sufficiente chiamare la funzione <code>get_the_author_meta()</code> o <code>the_author_meta()</code>:</p>
<div class="igBar"><span id="lphp-44"><a href="#" onclick="javascript:showCodeTxt('php-44'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-44">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;p&gt;Campo Aggiuntivo: <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author_meta<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nuovo_user_meta'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;bodytext=Le%20informazioni%20su%20un%20utente%2C%20o%20autore%2C%20di%20un%20blog%20Wordpress%20possono%20essere%20estese%20in%20modo%20semplice.%20Potrebbe%20ad%20esempio%20essere%20utile%20inserire%20la%20data%20di%20nascita%2C%20delle%20informazioni%20bibliografiche%2C%20l%27indirizzo%20della%20sede%20di%20lavoro%20o%2C%20estremamente%20com" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;notes=Le%20informazioni%20su%20un%20utente%2C%20o%20autore%2C%20di%20un%20blog%20Wordpress%20possono%20essere%20estese%20in%20modo%20semplice.%20Potrebbe%20ad%20esempio%20essere%20utile%20inserire%20la%20data%20di%20nascita%2C%20delle%20informazioni%20bibliografiche%2C%20l%27indirizzo%20della%20sede%20di%20lavoro%20o%2C%20estremamente%20com" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;t=Wordpress%3A%20estendere%20le%20informazioni%20utente" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;annotation=Le%20informazioni%20su%20un%20utente%2C%20o%20autore%2C%20di%20un%20blog%20Wordpress%20possono%20essere%20estese%20in%20modo%20semplice.%20Potrebbe%20ad%20esempio%20essere%20utile%20inserire%20la%20data%20di%20nascita%2C%20delle%20informazioni%20bibliografiche%2C%20l%27indirizzo%20della%20sede%20di%20lavoro%20o%2C%20estremamente%20com" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Wordpress%3A%20estendere%20le%20informazioni%20utente%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;headline=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Le%20informazioni%20su%20un%20utente%2C%20o%20autore%2C%20di%20un%20blog%20Wordpress%20possono%20essere%20estese%20in%20modo%20semplice.%20Potrebbe%20ad%20esempio%20essere%20utile%20inserire%20la%20data%20di%20nascita%2C%20delle%20informazioni%20bibliografiche%2C%20l%27indirizzo%20della%20sede%20di%20lavoro%20o%2C%20estremamente%20com" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;t=Wordpress%3A%20estendere%20le%20informazioni%20utente" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Wordpress%3A%20estendere%20le%20informazioni%20utente&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F&amp;title=Wordpress%3A%20estendere%20le%20informazioni%20utente" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F26%2Fwordpress-estendere-le-informazioni-utente%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/add_action/" title="add_action()" rel="tag">add_action()</a>, <a href="http://www.undolog.com/tag/functionsphp/" title="functions.php" rel="tag">functions.php</a>, <a href="http://www.undolog.com/tag/get_the_author_meta/" title="get_the_author_meta()" rel="tag">get_the_author_meta()</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/template/" title="Template" rel="tag">Template</a>, <a href="http://www.undolog.com/tag/the_author_meta/" title="the_author_meta()" rel="tag">the_author_meta()</a>, <a href="http://www.undolog.com/category/sviluppo/internet/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/03/wordpress-usare-gli-shortcodes/" title="Wordpress: usare gli shortcodes (3 luglio, 2009)">Wordpress: usare gli shortcodes</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/11/01/wordpress-rimuovere-i-menu-dellamministrazione/" title="Wordpress: rimuovere i menu dell&#8217;amministrazione (1 novembre, 2008)">Wordpress: rimuovere i menu dell&#8217;amministrazione</a> (12)</li>
	<li><a href="http://www.undolog.com/2009/02/09/wordpress-personalizzare-la-navigazione-tra-i-post/" title="Wordpress: personalizzare la navigazione tra i post (9 febbraio, 2009)">Wordpress: personalizzare la navigazione tra i post</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/10/22/wordpress-migliorare-la-lista-dei-commenti/" title="Wordpress: migliorare la lista dei commenti (22 ottobre, 2008)">Wordpress: migliorare la lista dei commenti</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/01/16/wordpress-functionsphp-qualche-funzione-utile/" title="Wordpress: functions.php, qualche funzione utile (16 gennaio, 2009)">Wordpress: functions.php, qualche funzione utile</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/26/wordpress-estendere-le-informazioni-utente/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FireFox 3.5.7: come risolvere il difetto dei bordi arrotondati su un&#8217;immagine</title>
		<link>http://www.undolog.com/2010/01/21/firefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine/</link>
		<comments>http://www.undolog.com/2010/01/21/firefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 22:41:26 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[-moz-border-radius]]></category>
		<category><![CDATA[-webkit-border-radius]]></category>
		<category><![CDATA[border-radius]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Compatibilità]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[IMG]]></category>
		<category><![CDATA[Immagini]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Snipp]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2809</guid>
		<description><![CDATA[A volte basta spostare un elemento, cambiando punto di vista, per risolvere un problema apparentemente insuperabile. Quando poi si ha a che fare con compatibilità tra i browser e CSS, inventarsi soluzioni "spettacolari" (acrobazie direi) è all'ordine del giorno. Quello che vi mostro è un modo semplice per applicare bordi arrotondati a delle immagini utilizzando [...]]]></description>
			<content:encoded><![CDATA[<p>A volte basta spostare un elemento, cambiando punto di vista, per risolvere un problema apparentemente insuperabile. Quando poi si ha a che fare con compatibilità tra i browser e CSS, inventarsi soluzioni "spettacolari" (acrobazie direi) è all'ordine del giorno. Quello che vi mostro è un modo semplice per applicare bordi arrotondati a delle immagini utilizzando <code>-moz-border-radius</code>, disponibile per Mozilla FireFox e <code>-webkit-border-radius</code>, per Safari e Google Chrome.<br />
Normalmente questi attributi CSS vengono applicati a <em>container</em> come il <code>div</code>:</p>
<div class="igBar"><span id="lcss-50"><a href="#" onclick="javascript:showCodeTxt('css-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-50">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">div<span style="color: #cc00cc;">#box</span> <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#eee</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Con codice HTML del tipo:</p>
<div class="igBar"><span id="lhtml-51"><a href="#" onclick="javascript:showCodeTxt('html-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-51">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Ediv.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>div&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Ottenendo:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-20-a-21.47.18.png" alt="" title="Schermata 2010-01-20 a 21.47.18" width="114" height="114"  /></p>
<p>Volendo fare la stessa cosa su un'immagine, ci si accorge che il risultato è parzialmente raggiunto! Utilizzando un CSS di questo tipo:</p>
<div class="igBar"><span id="lcss-52"><a href="#" onclick="javascript:showCodeTxt('css-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-52">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">img<span style="color: #cc00cc;">#round-</span><span style="color: #000000; font-weight: bold;">border</span> <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">8px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">8px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#eee</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Su una formattazione HTML come questa:</p>
<div class="igBar"><span id="lhtml-53"><a href="#" onclick="javascript:showCodeTxt('html-53'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-53">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Eimg.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;round-border&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/undolog.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Round Image Test&quot;</span> <span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Safari e Google Chrome rispondono bene:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-20-a-21.55.29.png" alt="" title="Schermata 2010-01-20 a 21.55.29" width="65" height="65" /></p>
<p>Mentre FireFox stupisce mostrando:</p>
<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-20-a-21.57.08.png" alt="" title="Schermata 2010-01-20 a 21.57.08" width="62" height="62" /></p>
<p>Com'è possibile vedere dallo screenshot qui sopra, in FireFox 3.5.7 il bordo "arrotondato" sembra esserci ma l'immagine è rimasta squadrata!<br />
Un semplice espediente - utile in particolari casi - permette di risolvere agevolmente il problema:</p>
<div class="igBar"><span id="lcss-54"><a href="#" onclick="javascript:showCodeTxt('css-54'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-54">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">div<span style="color: #cc00cc;">#box</span> <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">8px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">8px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://dominio.com/images/undolog.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In pratica invece di utilizzare direttamente il tag <code>img</code>, sfruttiamo un contenitore qualsiasi - in questo caso un <code>div</code> - impostando il suo sfondo con l'immagine che vogliamo visualizzare con i bordi arrotondati.<br />
Questa soluzione ha ovviamente una serie di inconvenienti:</p>
<ol style="list-style: decimal">
<li>Abbiamo perso il tag <code>img</code> (con il suo attributo <code>alt</code>), di conseguenza nel DOM html non esiste nessuna immagine, il ché significa che eliminando i fogli di stile la nostra immagine scompare</li>
<li>Dovendo definire un contenitore (nel nostro caso un <code>div</code>) tramite i fogli di stile, dobbiamo conoscere in partenza la sua dimensione</li>
</ol>
<p>Come ho più volte scritto su questo blog sarebbe proprio il caso che lo "standard" CSS (2 o 3 che sia) modificasse il suo nome in "ognuno fa quello che gli pare" ...</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;bodytext=A%20volte%20basta%20spostare%20un%20elemento%2C%20cambiando%20punto%20di%20vista%2C%20per%20risolvere%20un%20problema%20apparentemente%20insuperabile.%20Quando%20poi%20si%20ha%20a%20che%20fare%20con%20compatibilit%C3%A0%20tra%20i%20browser%20e%20CSS%2C%20inventarsi%20soluzioni%20%22spettacolari%22%20%28acrobazie%20direi%29%20%C3%A8%20all%27ordi" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;notes=A%20volte%20basta%20spostare%20un%20elemento%2C%20cambiando%20punto%20di%20vista%2C%20per%20risolvere%20un%20problema%20apparentemente%20insuperabile.%20Quando%20poi%20si%20ha%20a%20che%20fare%20con%20compatibilit%C3%A0%20tra%20i%20browser%20e%20CSS%2C%20inventarsi%20soluzioni%20%22spettacolari%22%20%28acrobazie%20direi%29%20%C3%A8%20all%27ordi" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;t=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;annotation=A%20volte%20basta%20spostare%20un%20elemento%2C%20cambiando%20punto%20di%20vista%2C%20per%20risolvere%20un%20problema%20apparentemente%20insuperabile.%20Quando%20poi%20si%20ha%20a%20che%20fare%20con%20compatibilit%C3%A0%20tra%20i%20browser%20e%20CSS%2C%20inventarsi%20soluzioni%20%22spettacolari%22%20%28acrobazie%20direi%29%20%C3%A8%20all%27ordi" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;headline=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=A%20volte%20basta%20spostare%20un%20elemento%2C%20cambiando%20punto%20di%20vista%2C%20per%20risolvere%20un%20problema%20apparentemente%20insuperabile.%20Quando%20poi%20si%20ha%20a%20che%20fare%20con%20compatibilit%C3%A0%20tra%20i%20browser%20e%20CSS%2C%20inventarsi%20soluzioni%20%22spettacolari%22%20%28acrobazie%20direi%29%20%C3%A8%20all%27ordi" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;t=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F&amp;title=FireFox%203.5.7%3A%20come%20risolvere%20il%20difetto%20dei%20bordi%20arrotondati%20su%20un%27immagine" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F21%2Ffirefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/moz-border-radius/" title="-moz-border-radius" rel="tag">-moz-border-radius</a>, <a href="http://www.undolog.com/tag/webkit-border-radius/" title="-webkit-border-radius" rel="tag">-webkit-border-radius</a>, <a href="http://www.undolog.com/tag/border-radius/" title="border-radius" rel="tag">border-radius</a>, <a href="http://www.undolog.com/tag/browser/" title="browser" rel="tag">browser</a>, <a href="http://www.undolog.com/tag/chrome/" title="Chrome" rel="tag">Chrome</a>, <a href="http://www.undolog.com/tag/compatibilita/" title="Compatibilità" rel="tag">Compatibilità</a>, <a href="http://www.undolog.com/category/sviluppo/internet/css/" title="CSS" rel="tag">CSS</a>, <a href="http://www.undolog.com/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://www.undolog.com/tag/firefox/" title="firefox" rel="tag">firefox</a>, <a href="http://www.undolog.com/tag/google/" title="google" rel="tag">google</a>, <a href="http://www.undolog.com/tag/img/" title="IMG" rel="tag">IMG</a>, <a href="http://www.undolog.com/tag/immagini/" title="Immagini" rel="tag">Immagini</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/mozilla/" title="Mozilla" rel="tag">Mozilla</a>, <a href="http://www.undolog.com/tag/safari/" title="Safari" rel="tag">Safari</a>, <a href="http://www.undolog.com/tag/snipp/" title="Snipp" rel="tag">Snipp</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/web/" title="Web" rel="tag">Web</a>, <a href="http://www.undolog.com/tag/webkit/" title="WebKit" rel="tag">WebKit</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/10/30/jquery-bordi-rotondi-sulle-immagini-per-sovrapposizione/" title="jQuery: bordi rotondi sulle immagini per sovrapposizione (30 ottobre, 2008)">jQuery: bordi rotondi sulle immagini per sovrapposizione</a> (1)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2009/02/05/very-short-trick-disabilitare-il-ridimensionamento-di-una-textarea-su-safari/" title="Very short trick: disabilitare il ridimensionamento di una textarea su Safari (5 febbraio, 2009)">Very short trick: disabilitare il ridimensionamento di una textarea su Safari</a> (7)</li>
	<li><a href="http://www.undolog.com/2008/10/16/css3-qualcuno-ha-visto-internet-explorer/" title="CSS3: qualcuno ha visto Internet Explorer? (16 ottobre, 2008)">CSS3: qualcuno ha visto Internet Explorer?</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/10/28/creare-applicazioni-desktop-con-google-chrome-e-firefox/" title="Creare applicazioni Desktop con Google Chrome e FireFox? (28 ottobre, 2008)">Creare applicazioni Desktop con Google Chrome e FireFox?</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/21/firefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10 utili snippet per Apple iPhone</title>
		<link>http://www.undolog.com/2010/01/08/10-utili-snippet-per-apple-iphone/</link>
		<comments>http://www.undolog.com/2010/01/08/10-utili-snippet-per-apple-iphone/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 22:53:28 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2739</guid>
		<description><![CDATA[Eseguire un metodo dopo n secondi
Tutta la famiglia performSelector è davvero interessante e può essere utile in una moltitudine di casi. La sua applicazione più semplice e comune è la seguente:
PLAIN TEXT
Objective-C:




&#91;self performSelector:@selector&#40;myMethod&#41; withObject:nil afterDelay:3&#93;;


//


- &#40;void&#41;myMethod &#123;


&#160; &#160; NSLog&#40;@&#34;Hello World!&#34;&#41;;


&#125;






Tuttavia considerate che il "timer" non è preciso. Questa procedura, quindi, va usata quando non è [...]]]></description>
			<content:encoded><![CDATA[<h4>Eseguire un metodo dopo n secondi</h4>
<p>Tutta la famiglia <a target="_blank" href="http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/performSelector:withObject:afterDelay:"><code>performSelector</code></a> è davvero interessante e può essere utile in una moltitudine di casi. La sua applicazione più semplice e comune è la seguente:</p>
<div class="igBar"><span id="lobjc-65"><a href="#" onclick="javascript:showCodeTxt('objc-65'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-65">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>self performSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>myMethod<span style="color: #002200;">&#41;</span> withObject<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> afterDelay<span style="color: #002200;">:</span>3<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">//</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>myMethod <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Hello World!&quot;</span><span style="color: #002200;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Tuttavia considerate che il "timer" non è preciso. Questa procedura, quindi, va usata quando non è richiesta una "notevole" precisione temporale.</p>
<h4>Recuperare la versione dell'applicazione</h4>
<div class="igBar"><span id="lobjc-66"><a href="#" onclick="javascript:showCodeTxt('objc-66'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-66">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>version <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> infoDictionary<span style="color: #002200;">&#93;</span> objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleVersion&quot;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;versione = %@&quot;</span>, version<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>YES, <span style="text-transform:lowercase">true</span> o TRUE?</h4>
<p>Andando a spulciare nel Kernel Apple iPhone è possibile renderci conto che <code>YES</code>, <code>true</code> e <code>TRUE</code> sono in pratica la stessa edentica cosa:</p>
<div class="igBar"><span id="lobjc-67"><a href="#" onclick="javascript:showCodeTxt('objc-67'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-67">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// definizione di YES</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#define YES (BOOL)1</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#define NO &nbsp;(BOOL)0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// definizione di true</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#define true &nbsp;1</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#define false 0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// definizione di TRUE</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#if !defined(TRUE)</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6e371a;">#define TRUE 1</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#endif</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#if !defined(FALSE)</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6e371a;">#define FALSE 0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#endif</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Almeno per adesso...</p>
<h4>Vibrazione</h4>
<div class="igBar"><span id="lobjc-68"><a href="#" onclick="javascript:showCodeTxt('objc-68'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-68">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &lt;AudioToolbox/AudioToolbox.h&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">//</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">AudioServicesPlaySystemSound <span style="color: #002200;">&#40;</span>kSystemSoundID_Vibrate<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Puntatore CGImageRef a partire da un UIImage</h4>
<div class="igBar"><span id="lobjc-69"><a href="#" onclick="javascript:showCodeTxt('objc-69'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-69">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">UIImage <span style="color: #002200;">*</span>heart <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;LittleHeart.png&quot;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">CGImageRef image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>heart CGImage<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// L'immagine adesso può essere &quot;rasterizzata&quot; su un CGContextRef</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">CGContextDrawImage<span style="color: #002200;">&#40;</span>c, <span style="color: #002200;">&#40;</span>CGRect<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>0, 0, 100, 100<span style="color: #002200;">&#125;</span>, image<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Animazioni</h4>
<div class="igBar"><span id="lobjc-70"><a href="#" onclick="javascript:showCodeTxt('objc-70'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-70">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView beginAnimations<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> context<span style="color: #002200;">:</span><span style="color: #a61390;">NULL</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationDuration<span style="color: #002200;">:</span>1.5<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView setAnimationCurve<span style="color: #002200;">:</span>UIViewAnimationCurveEaseInOut<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// ...</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>UIView commitAnimations<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>NSLog</h4>
<div class="igBar"><span id="lobjc-71"><a href="#" onclick="javascript:showCodeTxt('objc-71'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-71">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;NSString object %@ &quot;</span>, myString<span style="color: #002200;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Float: %f &quot;</span>, myFloat<span style="color: #002200;">&#41;</span>; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Integer: %i &quot;</span>, myInt<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Convertitore da RGB a UIColor</h4>
<div class="igBar"><span id="lobjc-72"><a href="#" onclick="javascript:showCodeTxt('objc-72'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-72">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Passare parametri ad un NSTimer</h4>
<p>Sfruttando il parametro <code>userInfo</code> è possibile inviare un puntatore ad un nostro oggetto al metodo richiamato da timer.</p>
<div class="igBar"><span id="lobjc-73"><a href="#" onclick="javascript:showCodeTxt('objc-73'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-73">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/"><span style="color: #400080;">NSTimer</span></a> scheduledTimerWithTimeInterval<span style="color: #002200;">:</span>1 target<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>timerMethod<span style="color: #002200;">&#41;</span> userInfo<span style="color: #002200;">:</span>objectPointer repeats<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// ...</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>timerMethod<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/"><span style="color: #400080;">NSTimer</span></a><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>timer <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// Recupero il puntatore al mio oggetto</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">objectPointer <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>timer userInfo<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// oppure</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>timer userInfo<span style="color: #002200;">&#93;</span> myMethod<span style="color: #002200;">&#93;</span>; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">int</span> a <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>timer userInfo<span style="color: #002200;">&#93;</span> myProperty<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// che è lo stesso</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">int</span> a <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>objectPointer myProperty<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Tempo di esecuzione</h4>
<p>Ecco un semplice modo per calcolare tempi brevi utili per verificare la velocità di esecuzione del codice:</p>
<div class="igBar"><span id="lobjc-74"><a href="#" onclick="javascript:showCodeTxt('objc-74'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-74">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">CFAbsoluteTime initialTime <span style="color: #002200;">=</span> CFAbsoluteTimeGetCurrent<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// ... code</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">CFAbsoluteTime finalTime <span style="color: #002200;">=</span> CFAbsoluteTimeGetCurrent<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Tempo trascorso %f&quot;</span>, finalTime<span style="color: #002200;">-</span>initialTime<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone&amp;bodytext=Eseguire%20un%20metodo%20dopo%20n%20secondi%0D%0ATutta%20la%20famiglia%20performSelector%20%C3%A8%20davvero%20interessante%20e%20pu%C3%B2%20essere%20utile%20in%20una%20moltitudine%20di%20casi.%20La%20sua%20applicazione%20pi%C3%B9%20semplice%20e%20comune%20%C3%A8%20la%20seguente%3A%0D%0A%5Bobjc%5D%0D%0A%5Bself%20performSelector%3A%40selector%28myMethod%29" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone&amp;notes=Eseguire%20un%20metodo%20dopo%20n%20secondi%0D%0ATutta%20la%20famiglia%20performSelector%20%C3%A8%20davvero%20interessante%20e%20pu%C3%B2%20essere%20utile%20in%20una%20moltitudine%20di%20casi.%20La%20sua%20applicazione%20pi%C3%B9%20semplice%20e%20comune%20%C3%A8%20la%20seguente%3A%0D%0A%5Bobjc%5D%0D%0A%5Bself%20performSelector%3A%40selector%28myMethod%29" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;t=10%20utili%20snippet%20per%20Apple%20iPhone" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone&amp;annotation=Eseguire%20un%20metodo%20dopo%20n%20secondi%0D%0ATutta%20la%20famiglia%20performSelector%20%C3%A8%20davvero%20interessante%20e%20pu%C3%B2%20essere%20utile%20in%20una%20moltitudine%20di%20casi.%20La%20sua%20applicazione%20pi%C3%B9%20semplice%20e%20comune%20%C3%A8%20la%20seguente%3A%0D%0A%5Bobjc%5D%0D%0A%5Bself%20performSelector%3A%40selector%28myMethod%29" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=10%20utili%20snippet%20per%20Apple%20iPhone%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=10%20utili%20snippet%20per%20Apple%20iPhone&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=10%20utili%20snippet%20per%20Apple%20iPhone&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=10%20utili%20snippet%20per%20Apple%20iPhone&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;headline=10%20utili%20snippet%20per%20Apple%20iPhone&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Eseguire%20un%20metodo%20dopo%20n%20secondi%0D%0ATutta%20la%20famiglia%20performSelector%20%C3%A8%20davvero%20interessante%20e%20pu%C3%B2%20essere%20utile%20in%20una%20moltitudine%20di%20casi.%20La%20sua%20applicazione%20pi%C3%B9%20semplice%20e%20comune%20%C3%A8%20la%20seguente%3A%0D%0A%5Bobjc%5D%0D%0A%5Bself%20performSelector%3A%40selector%28myMethod%29" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;t=10%20utili%20snippet%20per%20Apple%20iPhone" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=10%20utili%20snippet%20per%20Apple%20iPhone&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F&amp;title=10%20utili%20snippet%20per%20Apple%20iPhone" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F08%2F10-utili-snippet-per-apple-iphone%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/apple/" title="Apple" rel="tag">Apple</a>, <a href="http://www.undolog.com/tag/iphone/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/tag/snippets/" title="Snippets" rel="tag">Snippets</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/10/09/very-short-snippet-iphone-numeri-casuali/" title="Very short snippet: iPhone, numeri casuali (9 ottobre, 2009)">Very short snippet: iPhone, numeri casuali</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/20/xcode-consigli-sul-debugging-preferences/" title="XCode: consigli sul Debugging Preferences (20 luglio, 2009)">XCode: consigli sul Debugging Preferences</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/23/xcode-shortcut/" title="Xcode shortcut (23 luglio, 2009)">Xcode shortcut</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/06/16/very-short-trick-fermare-nstimer/" title="Very short trick: fermare NSTimer (16 giugno, 2009)">Very short trick: fermare NSTimer</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/08/10-utili-snippet-per-apple-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commodore 64 Javascript emulator</title>
		<link>http://www.undolog.com/2010/01/06/commodore-64-javascript-emulator/</link>
		<comments>http://www.undolog.com/2010/01/06/commodore-64-javascript-emulator/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:18:38 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ActionScript-3.0]]></category>
		<category><![CDATA[Adobe-Flash]]></category>
		<category><![CDATA[Commodore-64]]></category>
		<category><![CDATA[emulatori]]></category>
		<category><![CDATA[Porting]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2788</guid>
		<description><![CDATA[Un po' di tempo fa avevo segnalato la versione di un emulatore Commodore 64 scritto in Adobe Actionscript 3.0, oggi in una nuova versione:

Adesso è possibile apprezzare il porting della versione Adobe Flash in Javascript:

Sicuramente più lenta della sua controparte in Flash, questa versione in javascript si avvale di jQuery e, di fatto, ne diventa [...]]]></description>
			<content:encoded><![CDATA[<p>Un po' di tempo fa avevo <a href="http://www.undolog.com/2007/03/02/commodore-64-web-emulator/">segnalato</a> la versione di un emulatore <strong>Commodore 64</strong> scritto in <strong>Adobe Actionscript 3.0</strong>, oggi in una <a target="_blank" href="http://codeazur.com.br/stuff/fc64_final/">nuova versione</a>:</p>
<p class="center"><a target="_blank" class="notarget" href="http://codeazur.com.br/stuff/fc64_final/"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-06-a-00.00.101.png" alt="Commodore 64 Emulator in Adobe Flash" title="Commodore 64 Emulator in Adobe Flash"  /></a></p>
<p>Adesso è possibile apprezzare il porting della versione Adobe Flash in <strong><a target="_blank" href="http://www.kingsquare.nl/jsc64">Javascript</a></strong>:<br />
<a target="_blank" class="notarget" href="http://www.kingsquare.nl/jsc64"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-05-a-23.59.531.png" alt="Commodore 64 Emulator in Javascript" title="Commodore 64 Emulator in Javascript" /></a><br />
Sicuramente più lenta della sua controparte in Flash, questa versione in javascript si avvale di <a target="_blank" href="http://jquery.com">jQuery</a> e, di fatto, ne diventa un'estensione per non dire Plugin <img src='http://www.undolog.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (assai riduttivo). Buon divertimento...</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;bodytext=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;notes=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;t=Commodore%2064%20Javascript%20emulator" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;annotation=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Commodore%2064%20Javascript%20emulator%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Commodore%2064%20Javascript%20emulator&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Commodore%2064%20Javascript%20emulator&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Commodore%2064%20Javascript%20emulator&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;headline=Commodore%2064%20Javascript%20emulator&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;t=Commodore%2064%20Javascript%20emulator" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Commodore%2064%20Javascript%20emulator&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/actionscript-3-0/" title="ActionScript-3.0" rel="tag">ActionScript-3.0</a>, <a href="http://www.undolog.com/tag/adobe-flash/" title="Adobe-Flash" rel="tag">Adobe-Flash</a>, <a href="http://www.undolog.com/tag/commodore-64/" title="Commodore-64" rel="tag">Commodore-64</a>, <a href="http://www.undolog.com/tag/emulatori/" title="emulatori" rel="tag">emulatori</a>, <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/jquery-javascript-internet-sviluppo/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.undolog.com/tag/porting/" title="Porting" rel="tag">Porting</a>, <a href="http://www.undolog.com/category/software/" title="Software" rel="tag">Software</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/03/14/emulatore-assembler-6502/" title="Emulatore Assembler 6502 (14 marzo, 2007)">Emulatore Assembler 6502</a> (3)</li>
	<li><a href="http://www.undolog.com/2007/03/02/commodore-64-web-emulator/" title="Commodore 64 Web Emulator (2 marzo, 2007)">Commodore 64 Web Emulator</a> (4)</li>
	<li><a href="http://www.undolog.com/2007/03/05/codice-per-commodore-64/" title="Codice per Commodore 64 (5 marzo, 2007)">Codice per Commodore 64</a> (5)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/04/10/unobtrusive-flash-objects/" title="Unobtrusive Flash Objects (10 aprile, 2007)">Unobtrusive Flash Objects</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/06/commodore-64-javascript-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C: esporre proprietà in una classe</title>
		<link>http://www.undolog.com/2009/12/14/objective-c-esporre-proprieta-in-una-classe/</link>
		<comments>http://www.undolog.com/2009/12/14/objective-c-esporre-proprieta-in-una-classe/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 16:30:11 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[@synthesize]]></category>
		<category><![CDATA[Apple iPhone]]></category>
		<category><![CDATA[classe]]></category>
		<category><![CDATA[getter]]></category>
		<category><![CDATA[Object-Oriented]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[Release]]></category>
		<category><![CDATA[retain]]></category>
		<category><![CDATA[setter]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2773</guid>
		<description><![CDATA[Vorrei mostrare e discutere alcuni esempi sul come aggiungere e manipolare proprietà in una Classe Objective-C. Un esempio classico, per l'appunto, è il seguente; nella definizione della nostra interfaccia di classe definiamo due proprietà nome e cognome:
PLAIN TEXT
Objective-C:




// MyClass.h


#import &#60;Foundation/Foundation.h&#62;


&#160;


@interface MyClass : NSObject &#123;


&#160; &#160; NSString *nome;


&#160; &#160; NSString *cognome;


&#125;


&#160;


@property &#40;retain&#41; NSString *nome;


@property &#40;retain&#41; NSString [...]]]></description>
			<content:encoded><![CDATA[<p>Vorrei mostrare e discutere alcuni esempi sul come aggiungere e manipolare proprietà in una Classe Objective-C. Un esempio classico, per l'appunto, è il seguente; nella definizione della nostra interfaccia di classe definiamo due proprietà <code>nome</code> e <code>cognome</code>:</p>
<div class="igBar"><span id="lobjc-85"><a href="#" onclick="javascript:showCodeTxt('objc-85'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-85">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// MyClass.h</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &lt;Foundation/Foundation.h&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> MyClass <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>nome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>cognome;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>retain<span style="color: #002200;">&#41;</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>nome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>retain<span style="color: #002200;">&#41;</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>cognome;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nel file di implementazione inseriamo la dichiarazione <code>@synthesize</code> in modo tale che Xcode produca per noi i metodi <code>getter</code> e <code>setter</code> usati rispettivamente per leggere ed impostare le nostre due proprietà:</p>
<div class="igBar"><span id="lobjc-86"><a href="#" onclick="javascript:showCodeTxt('objc-86'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-86">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// MyClass.m</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &quot;MyClass.h&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@implementation</span> MyClass</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@synthesize</span> nome, cognome;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Quando andremo ad utilizzare la nostra classe <code>MyClass</code>, cioè quando istanziaremo un oggetto di tipo <code>MyClass</code>, possiamo scrive:</p>
<div class="igBar"><span id="lobjc-87"><a href="#" onclick="javascript:showCodeTxt('objc-87'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-87">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// qualsiasi altra classe, come AppDelegate</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// nel file .h</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &lt;UIKit/UIKit.h&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &quot;MyClass.h&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@class</span> TestViewController;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> TesAppDelegate <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> &lt;UIApplicationDelegate&gt; <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; UIWindow <span style="color: #002200;">*</span>window;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; TestViewController <span style="color: #002200;">*</span>viewController;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; MyClass <span style="color: #002200;">*</span>miaClasse;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// nel file .m</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">miaClasse <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>MyClass alloc<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">miaClasse.nome <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Giovambattista&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;miaClasse.nome = %@&quot;</span>, miaClasse.nome<span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Oppure, che è equivalente:</p>
<div class="igBar"><span id="lobjc-88"><a href="#" onclick="javascript:showCodeTxt('objc-88'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-88">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// sempre nel file .m</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>miaClasse setNome<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Undolog&quot;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;miaClasse.nome = %@&quot;</span>,<span style="color: #002200;">&#91;</span>miaClasse nome<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Fin qui tutto bene. Tuttavia potrebbe fuorviare l'equivalenza delle "variabli" interne (ivar) con il nome della proprietà vera e propria. Per capire la differenza, ripropongo lo stesso esempio facendo a meno, questa volta, di <code>@synthesize</code>. Ora, quindi, dovremmo occuparci noi di scrivere i metodi <code>getter</code> e <code>setter</code>. Per sottolineare ulteriormente le differenze, rinominerò le variabili interne inserendo un underscore davanti al nome. Ma vediamo il codice:</p>
<div class="igBar"><span id="lobjc-89"><a href="#" onclick="javascript:showCodeTxt('objc-89'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-89">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &lt;Foundation/Foundation.h&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> MyClass <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>_nome;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>_cognome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> nome; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// get</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> cognome; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// get</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setNome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso; &nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// set</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setCognome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso; &nbsp;<span style="color: #11740a; font-style: italic;">// set</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
A differenza dell'esempio precedente i puntatori alla variabili interne (incapsultate) sono diventati <code>_nome</code> e <code>_cognome</code>. Inoltre troviamo quattro definizioni di metodi che rappresentano le nostre <code>get</code> e <code>set</code>. <code>@property</code> è scomparso, in quanto non serve più.<br />
Vediamo il file di implementazione <code>MyClass.m</code>:</p>
<div class="igBar"><span id="lobjc-90"><a href="#" onclick="javascript:showCodeTxt('objc-90'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-90">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &quot;MyClass.h&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@implementation</span> MyClass</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// get per &quot;nome&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> nome <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">return</span> _nome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// set per &quot;nome&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setNome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; _nome <span style="color: #002200;">=</span> stringaIngresso;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// get per &quot;cognome&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> cognome <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">return</span> _cognome;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// set per &quot;cognome&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setCognome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; _cognome <span style="color: #002200;">=</span> stringaIngresso;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Una classe così scritta potrà essere utilizzata esattamente come la precedente, cioè:</p>
<div class="igBar"><span id="lobjc-91"><a href="#" onclick="javascript:showCodeTxt('objc-91'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-91">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">miaClasse <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>MyClass alloc<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">miaClasse.nome <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Giovambattista&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;miaClasse.nome = %@&quot;</span>, miaClasse.nome<span style="color: #002200;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// Oppure, che è equivalente:</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>miaClasse setNome<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Undolog&quot;</span><span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;miaClasse.nome = %@&quot;</span>,<span style="color: #002200;">&#91;</span>miaClasse nome<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
A livello didattico l'abbandono di <code>@synthesize</code> ci ha costretto a scrivere "da soli" i metodi di <code>get</code> e <code>set</code>, evidenziando - anche con l'aggiunta dell'underscore - le differenze tra il nome della proprietà e la sua ivar interna <code>_nome</code>.<br />
A livello funzionale l'uso dei metodi personali <code>get</code> e <code>set</code> permette un reale controllo del dato prima della sua impostazione (o prima della sua lettura) e quindi un reale incapsulamento per proteggere la variabile interna.<br />
Ad esempio sarebbe possibile impedire il passaggio di stringhe vuote alla proprietà <code>nome</code>:</p>
<div class="igBar"><span id="lobjc-92"><a href="#" onclick="javascript:showCodeTxt('objc-92'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-92">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setNome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> stringaIngresso <span style="color: #002200;">==</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span> <span style="color: #002200;">&#41;</span> stringaIngresso <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;senza nome&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; _nome <span style="color: #002200;">=</span> stringaIngresso;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Ulteriore variante</h4>
<p>Se desiderate utilizzare le variabili interne con l'underscore davanti (chi rpoviene da Adobe Actionscript potrebbe essere abituato così) non è necessario abbandonare l'uso della direttiva <code>@synthesize</code>. Xcode permette infatti di "fondere" i metodi sopra indicati:</p>
<div class="igBar"><span id="lobjc-93"><a href="#" onclick="javascript:showCodeTxt('objc-93'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-93">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@synthesize</span> nome <span style="color: #002200;">=</span> _nome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@synthesize</span> cognome <span style="color: #002200;">=</span> _cognome;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Così facendo potremmo usare internamente il puntatore a <code>_nome</code>, "sintetizzato" - verso l'esterno - come proprietà <code>nome</code>. Inoltre, se è vero che l'uso di <code>@synthesize</code> produce la generazione automatica dei metodi (messaggi) di <code>getter</code> e <code>setter</code>, è vero anche che lo fa solo se non li trova, quindi se desiderate "implementare" un vostro metodo di <code>getter</code> e/o <code>setter</code> <strong>potete farlo anche se avete usato la direttiva <code>@synthesize</code></strong>.</p>
<h4>Allocazioni di memoria</h4>
<p>Negli esempi di sopra ho omesso alcuni dettagli importanti ai fini di una reale implementazione. Prima di tutto non ho illustrato nessun metodo <code>init()</code>, utile ai fini dell'inizializzazione dell'oggetto e dei sui valori di default. Inoltre, manca l'aggiunta di un metodo <code>dealloc()</code>:</p>
<div class="igBar"><span id="lobjc-94"><a href="#" onclick="javascript:showCodeTxt('objc-94'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-94">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// file MyClass.m</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6e371a;">#import &quot;MyClass.h&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@implementation</span> MyClass</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span> init <span style="color: #002200;">&#123;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> self <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>super init<span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; _nome <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Nome preimpostato&quot;</span>; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; _cognome <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cognome preimpostato&quot;</span>; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #002200;">&#125;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">return</span> self; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> dealloc <span style="color: #002200;">&#123;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_nome release<span style="color: #002200;">&#93;</span>; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>_cognome release<span style="color: #002200;">&#93;</span>; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super dealloc<span style="color: #002200;">&#93;</span>; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> nome <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">return</span> _nome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setNome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span> stringaIngresso <span style="color: #002200;">==</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span> <span style="color: #002200;">&#41;</span> stringaIngresso <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;senza nome&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; _nome <span style="color: #002200;">=</span> stringaIngresso;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> cognome <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">return</span> _cognome;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> setCognome<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>stringaIngresso <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; _cognome <span style="color: #002200;">=</span> stringaIngresso;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In futuro vedremo poi i dettagli sulle proprietà <code>readonly</code>, <code>retain</code>, etc... <img src='http://www.undolog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;bodytext=Vorrei%20mostrare%20e%20discutere%20alcuni%20esempi%20sul%20come%20aggiungere%20e%20manipolare%20propriet%C3%A0%20in%20una%20Classe%20Objective-C.%20Un%20esempio%20classico%2C%20per%20l%27appunto%2C%20%C3%A8%20il%20seguente%3B%20nella%20definizione%20della%20nostra%20interfaccia%20di%20classe%20definiamo%20due%20propriet%C3%A0%20nome%20e%20" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;notes=Vorrei%20mostrare%20e%20discutere%20alcuni%20esempi%20sul%20come%20aggiungere%20e%20manipolare%20propriet%C3%A0%20in%20una%20Classe%20Objective-C.%20Un%20esempio%20classico%2C%20per%20l%27appunto%2C%20%C3%A8%20il%20seguente%3B%20nella%20definizione%20della%20nostra%20interfaccia%20di%20classe%20definiamo%20due%20propriet%C3%A0%20nome%20e%20" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;t=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;annotation=Vorrei%20mostrare%20e%20discutere%20alcuni%20esempi%20sul%20come%20aggiungere%20e%20manipolare%20propriet%C3%A0%20in%20una%20Classe%20Objective-C.%20Un%20esempio%20classico%2C%20per%20l%27appunto%2C%20%C3%A8%20il%20seguente%3B%20nella%20definizione%20della%20nostra%20interfaccia%20di%20classe%20definiamo%20due%20propriet%C3%A0%20nome%20e%20" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;headline=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Vorrei%20mostrare%20e%20discutere%20alcuni%20esempi%20sul%20come%20aggiungere%20e%20manipolare%20propriet%C3%A0%20in%20una%20Classe%20Objective-C.%20Un%20esempio%20classico%2C%20per%20l%27appunto%2C%20%C3%A8%20il%20seguente%3B%20nella%20definizione%20della%20nostra%20interfaccia%20di%20classe%20definiamo%20due%20propriet%C3%A0%20nome%20e%20" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;t=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F&amp;title=Objective-C%3A%20esporre%20propriet%C3%A0%20in%20una%20classe" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F14%2Fobjective-c-esporre-proprieta-in-una-classe%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/synthesize/" title="@synthesize" rel="tag">@synthesize</a>, <a href="http://www.undolog.com/tag/apple-iphone/" title="Apple iPhone" rel="tag">Apple iPhone</a>, <a href="http://www.undolog.com/tag/classe/" title="classe" rel="tag">classe</a>, <a href="http://www.undolog.com/tag/getter/" title="getter" rel="tag">getter</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/object-oriented/" title="Object-Oriented" rel="tag">Object-Oriented</a>, <a href="http://www.undolog.com/tag/objective-c/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/tag/property/" title="property" rel="tag">property</a>, <a href="http://www.undolog.com/tag/release/" title="Release" rel="tag">Release</a>, <a href="http://www.undolog.com/tag/retain/" title="retain" rel="tag">retain</a>, <a href="http://www.undolog.com/tag/setter/" title="setter" rel="tag">setter</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/11/09/aggiungere-propriet-ad-un-movieclip/" title="Aggiungere propriet&agrave; ad un MovieClip (9 novembre, 2007)">Aggiungere propriet&agrave; ad un MovieClip</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/11/21/very-short-snippet-apple-iphone-file-system/" title="Very short snippet: Apple iPhone file system (21 novembre, 2009)">Very short snippet: Apple iPhone file system</a> (0)</li>
	<li><a href="http://www.undolog.com/2010/03/08/setanimationdidstopselector-usi-diversi-ed-avanzati/" title="setAnimationDidStopSelector: usi diversi ed avanzati (8 marzo, 2010)">setAnimationDidStopSelector: usi diversi ed avanzati</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/06/12/da-actionscript-ad-objective-c/" title="Da Actionscript ad Objective-C (12 giugno, 2009)">Da Actionscript ad Objective-C</a> (1)</li>
	<li><a href="http://www.undolog.com/2009/06/26/come-eliminare-nslog-dai-sorgenti-xcode/" title="Come eliminare NSLog() dai sorgenti XCode (26 giugno, 2009)">Come eliminare NSLog() dai sorgenti XCode</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/12/14/objective-c-esporre-proprieta-in-una-classe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser o Mobile Browser?</title>
		<link>http://www.undolog.com/2009/12/11/browser-o-mobile-browser/</link>
		<comments>http://www.undolog.com/2009/12/11/browser-o-mobile-browser/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 00:30:28 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[$_SERVER['HTTP_USER_AGENT']]]></category>
		<category><![CDATA[Apple iPhone]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[Device]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Tema]]></category>
		<category><![CDATA[user-agent]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2764</guid>
		<description><![CDATA[Il nostro sito Web ormai non è visualizzato solo da postazioni PC. Con la diffusione del mobile, grazie soprattutto ad Apple iPhone, l'accesso al sito o blog viene sempre più spesso effettuato da dispositivi mobili di vario tipo. Diventa quindi esigenza di molti Web Developer saper intercettare ed identificare i diversi "agenti", cioè gli strumenti [...]]]></description>
			<content:encoded><![CDATA[<p>Il nostro sito Web ormai non è visualizzato solo da postazioni PC. Con la diffusione del mobile, grazie soprattutto ad Apple iPhone, l'accesso al sito o blog viene sempre più spesso effettuato da dispositivi mobili di vario tipo. Diventa quindi esigenza di molti Web Developer saper intercettare ed identificare i diversi "agenti", cioè gli strumenti con cui un utente visualizza (naviga) le nostre pagine.<br />
Per Wordpress, ad esempio, che rappresenta una delle piattaforme Blog più diffuse, esistono da tempo Plugin che permettono di visualizzare in modo differente il nostro Blog in base al "device" che si utilizza. Questi Plugin non fanno altro che intercettare il tipo di dispositivo usato e re-indirizzare un tema appropriato. Chi possiede un Apple iPhone avrà infatti notato che alcuni Blog vengono visualizzati in modo totalmente differente, proprio grazie al cambio del tema effettuato da questi Plugin.<br />
La procedura, tuttavia, può essere generalizzata e applicata a qualsiasi pagina Web. Sfruttando PHP è possibile identificare l'agente e decidere che tipo di output emettere:</p>
<div class="igBar"><span id="lphp-98"><a href="#" onclick="javascript:showCodeTxt('php-98'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-98">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// fornisce le informazioni sull'agente che ha richiesto</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// questa pagina</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// l'output sarà tipo:</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; it; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Analizzando la stringa contenuta in <code>$_SERVER['HTTP_USER_AGENT']</code> è possibile identificare l'agente e comportarsi di conseguenza. Se ad esempio avete la necessità di mostrare un contenuto con un layout differente agli utenti Apple iPhone, potete inserire queste righe di codice nella vostra pagina PHP:</p>
<div class="igBar"><span id="lphp-99"><a href="#" onclick="javascript:showCodeTxt('php-99'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-99">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/eregi"><span style="color: #990000;">eregi</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'iphone'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Apple iPhone</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Tutti gli altri</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Le combinazioni sono varie e, senza impazzire più di tanto, consiglio di scaricare questa piccola libreria (che poi non è nemmeno una libreria) scritta da <a target="_blank" href="http://detectmobilebrowsers.mobi/">Andy Moore</a>: <a target="_blank" href="http://detectmobilebrowsers.mobi/?dl">mobile_device_detect.php</a>.<br />
Il suo uso è davvero semplice e permette di intercettare moltissimi device: Apple iPhone/iPod, Android, Palm, ...<br />
Per utilizzarla basta includere il file <a target="_blank" href="http://detectmobilebrowsers.mobi/?dl">mobile_device_detect.php</a> e controllare il rotorno della funzione <code>mobile_device_detect()</code>:</p>
<div class="igBar"><span id="lphp-100"><a href="#" onclick="javascript:showCodeTxt('php-100'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-100">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// ...</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">require_once</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mobile_device_detect.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$mobile</span> <span style="color: #339933;">=</span> mobile_device_detect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
La funzione accetta otto (8) parametri (opzionali) in ingresso che ne determinano il comportamento, compreso un re-direct nel caso sia stato trovato il device specificato nei parametri d'ingresso. Sul sito è disponibile anche un comodo <a target="_blank" href="http://detectmobilebrowsers.mobi/#generator">"generatore" di funzione</a> che chiarisce il funzionamento.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F&amp;bodytext=Il%20nostro%20sito%20Web%20ormai%20non%20%C3%A8%20visualizzato%20solo%20da%20postazioni%20PC.%20Con%20la%20diffusione%20del%20mobile%2C%20grazie%20soprattutto%20ad%20Apple%20iPhone%2C%20l%27accesso%20al%20sito%20o%20blog%20viene%20sempre%20pi%C3%B9%20spesso%20effettuato%20da%20dispositivi%20mobili%20di%20vario%20tipo.%20Diventa%20quindi%20esi" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F&amp;notes=Il%20nostro%20sito%20Web%20ormai%20non%20%C3%A8%20visualizzato%20solo%20da%20postazioni%20PC.%20Con%20la%20diffusione%20del%20mobile%2C%20grazie%20soprattutto%20ad%20Apple%20iPhone%2C%20l%27accesso%20al%20sito%20o%20blog%20viene%20sempre%20pi%C3%B9%20spesso%20effettuato%20da%20dispositivi%20mobili%20di%20vario%20tipo.%20Diventa%20quindi%20esi" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;t=Browser%20o%20Mobile%20Browser%3F" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F&amp;annotation=Il%20nostro%20sito%20Web%20ormai%20non%20%C3%A8%20visualizzato%20solo%20da%20postazioni%20PC.%20Con%20la%20diffusione%20del%20mobile%2C%20grazie%20soprattutto%20ad%20Apple%20iPhone%2C%20l%27accesso%20al%20sito%20o%20blog%20viene%20sempre%20pi%C3%B9%20spesso%20effettuato%20da%20dispositivi%20mobili%20di%20vario%20tipo.%20Diventa%20quindi%20esi" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Browser%20o%20Mobile%20Browser%3F%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Browser%20o%20Mobile%20Browser%3F&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Browser%20o%20Mobile%20Browser%3F&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Browser%20o%20Mobile%20Browser%3F&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;headline=Browser%20o%20Mobile%20Browser%3F&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Il%20nostro%20sito%20Web%20ormai%20non%20%C3%A8%20visualizzato%20solo%20da%20postazioni%20PC.%20Con%20la%20diffusione%20del%20mobile%2C%20grazie%20soprattutto%20ad%20Apple%20iPhone%2C%20l%27accesso%20al%20sito%20o%20blog%20viene%20sempre%20pi%C3%B9%20spesso%20effettuato%20da%20dispositivi%20mobili%20di%20vario%20tipo.%20Diventa%20quindi%20esi" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;t=Browser%20o%20Mobile%20Browser%3F" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Browser%20o%20Mobile%20Browser%3F&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F&amp;title=Browser%20o%20Mobile%20Browser%3F" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F11%2Fbrowser-o-mobile-browser%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/_serverhttp_user_agent/" title="$_SERVER[&#039;HTTP_USER_AGENT&#039;]" rel="tag">$_SERVER[&#039;HTTP_USER_AGENT&#039;]</a>, <a href="http://www.undolog.com/tag/apple-iphone/" title="Apple iPhone" rel="tag">Apple iPhone</a>, <a href="http://www.undolog.com/tag/browser/" title="browser" rel="tag">browser</a>, <a href="http://www.undolog.com/tag/device/" title="Device" rel="tag">Device</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/tag/ipod/" title="iPod" rel="tag">iPod</a>, <a href="http://www.undolog.com/tag/layout/" title="Layout" rel="tag">Layout</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/plugin/" title="Plugin" rel="tag">Plugin</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/tema/" title="Tema" rel="tag">Tema</a>, <a href="http://www.undolog.com/tag/user-agent/" title="user-agent" rel="tag">user-agent</a>, <a href="http://www.undolog.com/category/sviluppo/internet/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.undolog.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/10/03/wordpress-come-scrivere-un-reply-to-comment-usando-jquery/" title="Wordpress: come scrivere un reply to comment usando jQuery (3 ottobre, 2008)">Wordpress: come scrivere un reply to comment usando jQuery</a> (18)</li>
	<li><a href="http://www.undolog.com/2009/06/04/un-tema-wordpress-per-tutti/" title="Un tema Wordpress per tutti (4 giugno, 2009)">Un tema Wordpress per tutti</a> (20)</li>
	<li><a href="http://www.undolog.com/2010/03/03/wp-bannerize-2-4-1/" title="WP Bannerize 2.4.1 (3 marzo, 2010)">WP Bannerize 2.4.1</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/10/27/wordpress-scrivere-un-logout-personale/" title="Wordpress: scrivere un logout personale (27 ottobre, 2008)">Wordpress: scrivere un logout personale</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/11/01/wordpress-rimuovere-i-menu-dellamministrazione/" title="Wordpress: rimuovere i menu dell&#8217;amministrazione (1 novembre, 2008)">Wordpress: rimuovere i menu dell&#8217;amministrazione</a> (12)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/12/11/browser-o-mobile-browser/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Personalizzare graficamente un Form</title>
		<link>http://www.undolog.com/2009/12/04/personalizzare-graficamente-un-form/</link>
		<comments>http://www.undolog.com/2009/12/04/personalizzare-graficamente-un-form/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 13:52:34 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[-moz-border-radius]]></category>
		<category><![CDATA[-webkit-border-radius]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[Style Sheet]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2724</guid>
		<description><![CDATA[Mi è stato chiesto come personalizzare graficamente un form, in particolare un form di ricerca come quello presente su questo blog. La tecnica utilizzata, o meglio che utilizzo io, è ovviamente valida per qualsiasi tipo di modulo form. Quello che cambia è solo la complessità del lavoro da svolgere in funzione della complessità del form [...]]]></description>
			<content:encoded><![CDATA[<p>Mi è stato chiesto come personalizzare graficamente un form, in particolare un form di ricerca come quello presente su questo blog. La tecnica utilizzata, o meglio che utilizzo io, è ovviamente valida per qualsiasi tipo di modulo form. Quello che cambia è solo la complessità del lavoro da svolgere in funzione della complessità del form stesso.</p>
<h4>Le basi</h4>
<p>Tramite i fogli di stile è possibile personalizzare completamente il layout di un qualsiasi modulo form. Uno degli ostacoli che si possono incontrare, come spesso accade, è relativo alla compatibilità con i vari browser in commercio e quindi con diversi risultati finali in base al browser utilizzato.<br />
Per questo, spesso, si opta per una soluzione sostanzialmente grafica, cioè si sfruttano delle immagini per ridefinire il layout grafico del form. Le immagini, infatti, sono le uniche entità che, salvo rai casi, sino ad oggi sono visualizzate sempre allo stesso modo su tutti i browser.</p>
<h4>Senza immagini</h4>
<p>Prima di vedere come alterare il layout di un form con delle immagini, vediamo quello che "sarebbe" possibile fare con i soli CSS. Un modulo form è formato nella maggiornza dei casi da campi <code>INPUT</code>. Tuttavia quello che vedremo è, in linea generale, applicabile a qualsiasi altro campo modulo. Tramite i CSS possiamo ridefinire l'aspetto del nostro campo <code>INPUT</code> agendo sulla sua dimensione, sul bordo, sullo sfondo, sul tipo di carattere, etc...<br />
Ad esempio è possibile migliorare la resa impostando semplicemente:</p>
<div class="igBar"><span id="lcss-108"><a href="#" onclick="javascript:showCodeTxt('css-108'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-108">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">input <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Mozilla FireFox e Safari permettono anche di regolare in modo semplice la rotondità dei bordi (vedi anche <em><a href="http://www.undolog.com/2008/10/16/css3-qualcuno-ha-visto-internet-explorer/">CSS3: qualcuno ha visto Internet Explorer?</a></em>):</p>
<div class="igBar"><span id="lcss-109"><a href="#" onclick="javascript:showCodeTxt('css-109'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-109">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">input <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">6px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">6px</span><span style="color: #00AA00;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In aggiunta possiamo inserire un'immagine come sfondo, per rendere più "accessibile" il significato del campo stesso:</p>
<div class="igBar"><span id="lcss-110"><a href="#" onclick="javascript:showCodeTxt('css-110'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-110">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">input <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">6px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">6px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/icon.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Se <code>icon.png</code> è un'icona di larghezza 16 pixel, tramite il <code>padding</code> permettiamo di posizionarla all'inizio del campo ma fuori dal testo.</p>
<h4>Le immagini nel Form</h4>
<p>L'ultimo esempio visto porterebbe ad una semplice soluzione nel momento in cui decidiamo di realizzare il layout del nostro campo <code>INPUT</code> completamene in grafica. Infatti in linea teorica basterebbe eliminare il bordo del campo e inserire un'immagine di background direttamente nel campo <code>INPUT</code>:</p>
<div class="igBar"><span id="lcss-111"><a href="#" onclick="javascript:showCodeTxt('css-111'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-111">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">input <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/custominput.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Dico in linea teorica perchè se da un lato questa tecnica funziona (vedi FireFox), dall'altro produce strani effetti su altri browser (vedi Microsoft Internet Explorer).<br />
Per sperare l'ostacolo si rende completamente trasparente il campo <code>INPUT</code> e l'immagine la si associa direttamente al tag <code>FORM</code>:</p>
<div class="igBar"><span id="lcss-112"><a href="#" onclick="javascript:showCodeTxt('css-112'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-112">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">input <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">form <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">24px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/custominput.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Il tutto con una "taggatura" HTML del tipo:</p>
<div class="igBar"><span id="lhtml-113"><a href="#" onclick="javascript:showCodeTxt('html-113'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-113">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Eform%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;form&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Einput.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cerca&quot;</span> <span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fform%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In base alla grafica scelta e alla complessità del form, bisognerà solo "sovrapporre" in modo corretto, e quindi posizionare, il campo <code>INPUT</code> all'immagine grafica sottostante posta come sfondo del form. Questo è possibile inserendo gli opportuni margini al campo <code>INPUT</code> stesso, per farlo coincidere con il nostro layout: </p>
<div class="igBar"><span id="lcss-114"><a href="#" onclick="javascript:showCodeTxt('css-114'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-114">
<div class="css" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">input <span style="color: #00AA00;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">24px</span><span style="color: #00AA00;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #00AA00;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form&amp;bodytext=Mi%20%C3%A8%20stato%20chiesto%20come%20personalizzare%20graficamente%20un%20form%2C%20in%20particolare%20un%20form%20di%20ricerca%20come%20quello%20presente%20su%20questo%20blog.%20La%20tecnica%20utilizzata%2C%20o%20meglio%20che%20utilizzo%20io%2C%20%C3%A8%20ovviamente%20valida%20per%20qualsiasi%20tipo%20di%20modulo%20form.%20Quello%20che%20c" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form&amp;notes=Mi%20%C3%A8%20stato%20chiesto%20come%20personalizzare%20graficamente%20un%20form%2C%20in%20particolare%20un%20form%20di%20ricerca%20come%20quello%20presente%20su%20questo%20blog.%20La%20tecnica%20utilizzata%2C%20o%20meglio%20che%20utilizzo%20io%2C%20%C3%A8%20ovviamente%20valida%20per%20qualsiasi%20tipo%20di%20modulo%20form.%20Quello%20che%20c" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;t=Personalizzare%20graficamente%20un%20Form" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form&amp;annotation=Mi%20%C3%A8%20stato%20chiesto%20come%20personalizzare%20graficamente%20un%20form%2C%20in%20particolare%20un%20form%20di%20ricerca%20come%20quello%20presente%20su%20questo%20blog.%20La%20tecnica%20utilizzata%2C%20o%20meglio%20che%20utilizzo%20io%2C%20%C3%A8%20ovviamente%20valida%20per%20qualsiasi%20tipo%20di%20modulo%20form.%20Quello%20che%20c" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Personalizzare%20graficamente%20un%20Form%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Personalizzare%20graficamente%20un%20Form&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Personalizzare%20graficamente%20un%20Form&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Personalizzare%20graficamente%20un%20Form&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;headline=Personalizzare%20graficamente%20un%20Form&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Mi%20%C3%A8%20stato%20chiesto%20come%20personalizzare%20graficamente%20un%20form%2C%20in%20particolare%20un%20form%20di%20ricerca%20come%20quello%20presente%20su%20questo%20blog.%20La%20tecnica%20utilizzata%2C%20o%20meglio%20che%20utilizzo%20io%2C%20%C3%A8%20ovviamente%20valida%20per%20qualsiasi%20tipo%20di%20modulo%20form.%20Quello%20che%20c" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;t=Personalizzare%20graficamente%20un%20Form" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Personalizzare%20graficamente%20un%20Form&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F&amp;title=Personalizzare%20graficamente%20un%20Form" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F12%2F04%2Fpersonalizzare-graficamente-un-form%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/moz-border-radius/" title="-moz-border-radius" rel="tag">-moz-border-radius</a>, <a href="http://www.undolog.com/tag/webkit-border-radius/" title="-webkit-border-radius" rel="tag">-webkit-border-radius</a>, <a href="http://www.undolog.com/tag/background-image/" title="background-image" rel="tag">background-image</a>, <a href="http://www.undolog.com/category/sviluppo/internet/css/" title="CSS" rel="tag">CSS</a>, <a href="http://www.undolog.com/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://www.undolog.com/tag/css3/" title="CSS3" rel="tag">CSS3</a>, <a href="http://www.undolog.com/tag/form/" title="form" rel="tag">form</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/style-sheet/" title="Style Sheet" rel="tag">Style Sheet</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a>, <a href="http://www.undolog.com/tag/webkit/" title="WebKit" rel="tag">WebKit</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2010/01/21/firefox-3-5-7-come-risolvere-il-difetto-dei-bordi-arrotondati-su-unimmagine/" title="FireFox 3.5.7: come risolvere il difetto dei bordi arrotondati su un&#8217;immagine (21 gennaio, 2010)">FireFox 3.5.7: come risolvere il difetto dei bordi arrotondati su un&#8217;immagine</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/10/16/css3-qualcuno-ha-visto-internet-explorer/" title="CSS3: qualcuno ha visto Internet Explorer? (16 ottobre, 2008)">CSS3: qualcuno ha visto Internet Explorer?</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/11/10/very-short-trick-versatilita-delle-classi-css/" title="Very short trick: versatilità delle classi CSS (10 novembre, 2008)">Very short trick: versatilità delle classi CSS</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/02/05/very-short-trick-disabilitare-il-ridimensionamento-di-una-textarea-su-safari/" title="Very short trick: disabilitare il ridimensionamento di una textarea su Safari (5 febbraio, 2009)">Very short trick: disabilitare il ridimensionamento di una textarea su Safari</a> (7)</li>
	<li><a href="http://www.undolog.com/2009/05/18/very-short-trick-css-condizionali-e-ottimizzazione/" title="Very short trick: CSS condizionali e ottimizzazione (18 maggio, 2009)">Very short trick: CSS condizionali e ottimizzazione</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/12/04/personalizzare-graficamente-un-form/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
