<?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>Todo 3DS</title>
	<atom:link href="http://www.todo3ds.es/en/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.todo3ds.es</link>
	<description>Tu blog de diseño e informática</description>
	<lastBuildDate>Sat, 10 Jul 2010 10:10:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>(Español) PHP Error Class &#8216;SoapClient&#8217; not found</title>
		<link>http://www.todo3ds.es/en/2010/07/10/php-error-class-soapclient-not-found/</link>
		<comments>http://www.todo3ds.es/en/2010/07/10/php-error-class-soapclient-not-found/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:10:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solución de errores]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=276</guid>
		<description><![CDATA[Sorry, this entry is only available in Español.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.todo3ds.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2010/07/10/php-error-class-soapclient-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Español) Autodesk lanza 3ds Max 2011</title>
		<link>http://www.todo3ds.es/en/2010/03/20/autodesk-lanza-3ds-max-2011/</link>
		<comments>http://www.todo3ds.es/en/2010/03/20/autodesk-lanza-3ds-max-2011/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 16:26:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Noticias]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=274</guid>
		<description><![CDATA[Sorry, this entry is only available in Español.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.todo3ds.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2010/03/20/autodesk-lanza-3ds-max-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Español) Autodesk lanza su aplicación 3D Softimage 2011</title>
		<link>http://www.todo3ds.es/en/2010/03/18/autodesk-lanza-su-aplicacion-3d-softimage-2011/</link>
		<comments>http://www.todo3ds.es/en/2010/03/18/autodesk-lanza-su-aplicacion-3d-softimage-2011/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 18:22:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Noticias]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=271</guid>
		<description><![CDATA[Sorry, this entry is only available in Español.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.todo3ds.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2010/03/18/autodesk-lanza-su-aplicacion-3d-softimage-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un hacker ha logrado piratear la PlayStation 3</title>
		<link>http://www.todo3ds.es/en/2010/01/26/un-hacker-ha-logrado-piratear-la-playstation-3/</link>
		<comments>http://www.todo3ds.es/en/2010/01/26/un-hacker-ha-logrado-piratear-la-playstation-3/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 08:41:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Noticias]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=265</guid>
		<description><![CDATA[Gaorge Hotz, el hacker que con 17 años en 2007 que consiguió piratear el iPhone, ha asegurado a la BBC que ha conseguido piratear la PlayStation 3 de Sony.
Dice que le ha costado cinco semanas piratear la consola y que ahora los usuarios podrán usar software pirata.
La PS3 hasta ahora no había podido ser hackeada [...]]]></description>
			<content:encoded><![CDATA[<p><span><strong>Gaorge Hotz</strong>, el hacker que con 17 años en 2007 que consiguió <strong>piratear el iPhone</strong>, ha asegurado a la BBC que ha conseguido <strong>piratear la PlayStation 3 de Sony</strong>.</span></p>
<p><span>Dice que le ha costado cinco semanas piratear la consola y que ahora los usuarios podrán usar software pirata.</span></p>
<p><span>La PS3 hasta ahora no había podido ser hackeada en sus tres años que lleva en el mercado.</span></p>
<p><span><strong>Gaorge Hotz, </strong></span><span>afirma que en breve colgará en internet los detalles del pirateo, cuanda lo haya refinado.<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2010/01/26/un-hacker-ha-logrado-piratear-la-playstation-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Español) Reproducir sonido en el iPhone con Objective-C</title>
		<link>http://www.todo3ds.es/en/2009/12/20/reproducir-sonido-en-el-iphone-con-objective-c/</link>
		<comments>http://www.todo3ds.es/en/2009/12/20/reproducir-sonido-en-el-iphone-con-objective-c/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 15:26:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[AudioServicesPlaySystemSound]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[initWithContentsOfFile]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[NSBundle]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[SoundEffect]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=256</guid>
		<description><![CDATA[Sorry, this entry is only available in Español.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.todo3ds.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2009/12/20/reproducir-sonido-en-el-iphone-con-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transitioning to Objective-C</title>
		<link>http://www.todo3ds.es/en/2009/12/20/english-transitioning-to-objective-c/</link>
		<comments>http://www.todo3ds.es/en/2009/12/20/english-transitioning-to-objective-c/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 15:23:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[objective c]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=254</guid>
		<description><![CDATA[Objective-C was written in the early 1980s by scientist and software engineer Brad Cox. It was designed as a way of  introducing the capabilities of the Smalltalk language into a C programming  environment. A majority of the iPhone&#8217;s framework libraries are written in  Objective-C, but because the language was designed to accommodate [...]]]></description>
			<content:encoded><![CDATA[<p class="docText"><a name="was written"></a>Objective-C was written in the early 1980s by scientist and software engineer Brad Cox. It was designed as a way of  introducing the capabilities of the Smalltalk language into a C programming  environment. A majority of the iPhone&#8217;s framework libraries are written in  Objective-C, but because the language was designed to accommodate the C  language, you can use C and C++ in your application as well. Objective-C is used  primarily on Mac OS X and GNUstep (a free OpenStep environment). Many languages,  such as Java and C#, have borrowed from the Objective-C language. The Cocoa  framework makes heavy use of Objective-C on the Mac desktop, which carried over  onto the iPhone.<a name="IDX-CHP-2-0079"></a><a name="IDX-CHP-2-0080"></a></p>
<p class="docText"><a name="on the"></a><span id="more-254"></span></p>
<p><a name="messaging"></a></p>
<h4 id="title-ID0EVSNM" class="docSection2Title">Messaging</h4>
<p class="docText"><a name="first thing"></a>The first thing you&#8217;ll notice in  Objective-C is the heavy use of brackets. In Objective-C, methods are not <span class="docEmphasis">called</span> in a traditional sense; instead, they are sent  <span class="docEmphasis">messages</span>. Likewise, a method doesn&#8217;t <span class="docEmphasis">return</span>, but rather <span class="docEmphasis">responds</span><a name="style allows"></a> to the message.  Unlike C, where function calls must be predefined, Objective-C&#8217;s messaging style  allows the developer to dynamically create new methods and messages at runtime.  The downside to this is that it&#8217;s entirely possible to send an object a message  to which it can&#8217;t respond, causing an exception and likely program  termination.<a name="IDX-CHP-2-0081"></a></p>
<p class="docText">Given an object named <tt>myWidget</tt><a name="to its"></a>, a  message can be sent to its <tt>powerOn</tt> method this way:</p>
<pre>returnValue = [ myWidget powerOn ];</pre>
<p class="docText">The C++ equivalent of this might look like:</p>
<pre>returnValue = myWidget-&gt;powerOn(  );</pre>
<p class="docText"><a name="its flat"></a>The C equivalent might declare a  function inside of its flat namespace:</p>
<pre>returnValue = widget_powerOn(myWidget);</pre>
<p class="docText"><a name="provided that"></a>Arguments can also be passed with  messages, provided that an object can receive them. The following example  invokes a method named <tt>setSpeed</tt> and passes two arguments:</p>
<pre>returnValue = [ myWidget setSpeed: 10.0 withMass: 33.0 ];</pre>
<p class="docText"><a name="the message"></a>Notice the second argument is  explicitly named in the message. This allows multiple methods with the same name  <span class="docEmphasis">and</span><a name="types to"></a> data types to be  declared—polymorphism on steroids.</p>
<pre>returnValue = [ myWidget setSpeed: 10.0 withMass: 33.0 ];
returnValue = [ myWidget setSpeed: 10.0 withGyroscope: 10.0 ];</pre>
<p><a name="class_and_method_declarations"></a></p>
<h4 id="title-ID0EKUNM" class="docSection2Title">Class and Method  Declarations</h4>
<p class="docText"><a name="using the"></a>While C++ classes can be defined in  Objective-C, the whole point of using the language is to take advantage of  Objective-C&#8217;s own objects and features. This extends to its use of interfaces.  In standard C++, classes are structures, and their variables and methods are  contained inside the structure. Objective-C, on the other hand, keeps its  variables in one part of the class and methods in another. The language also  requires that the interface declaration be specifically declared in its own code  block (called <tt>@interface</tt><a name="separate from"></a>) separate from the  block containing the implementation (called <tt>@implementation</tt><a name="themselves are"></a>). The methods themselves are also constructed in a  Smalltalk-esque fashion, and look very little like regular C functions.<a name="IDX-CHP-2-0082"></a><a name="IDX-CHP-2-0083"></a><a name="IDX-CHP-2-0084"></a></p>
<p class="docText"><a name="interface for"></a>The interface for our widget  example might look like <a class="docLink" href="#sample_interface_open_parenthesis">Example 1</a>, which is a file named  <em>MyWidget.h</em>.</p>
<p><a name="sample_interface_open_parenthesis"></a></p>
<h5 id="title-ID0EMVNM" class="docExampleTitle">Example 1. Sample interface  (MyWidget.h)</h5>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
<pre>#import &lt;Foundation/Foundation.h&gt;

@interface MyWidget : BaseWidget
{
    BOOL isPoweredOn;
    @private float speed;
    @protected float mass;
    @protected float gyroscope;
}
+ (id)alloc;
+ (BOOL)needsBatteries;
- (BOOL)powerOn;
- (void)setSpeed:(float)_speed;
- (void)setSpeed:(float)_speed withMass:(float)_mass;
- (void)setSpeed:(float)_speed withGyroscope:(float)_gyroscope;
@end</pre>
</td>
</tr>
</tbody>
</table>
<p class="docText"><a name="are explained"></a>Each of the important semantic  elements in this file are explained in the following sections.</p>
<p><a name="imports"></a></p>
<h5 id="title-ID0ETVNM" class="docSection3Title">Imports</h5>
<p class="docText">The preprocessor directive <tt>#import</tt> replaces the  traditional <tt>#include</tt> directive (although <tt>#include</tt><a name="to using"></a> may still be used). One advantage to using  <tt>#import</tt><a name="same resource"></a> is that it has built-in logic to  ensure that the same resource is never included more than once. This replaces  the round-about use of macro flags found routinely in C code:<a name="IDX-CHP-2-0085"></a></p>
<pre>#ifndef _MYWIDGET_H
#define _MYWIDGET_H
...
#endif</pre>
<p><a name="interface_declaration"></a></p>
<h5 id="title-ID0ENWNM" class="docSection3Title">Interface declaration</h5>
<p class="docText">The interface is declared with the <tt>@interface</tt><a name="the base"></a> statement followed by the interface&#8217;s name and the base  class (if any) it is derived from. The block is ended with the <tt>@end</tt> statement.<a name="IDX-CHP-2-0086"></a><a name="IDX-CHP-2-0087"></a><a name="IDX-CHP-2-0088"></a><a name="IDX-CHP-2-0089"></a><a name="IDX-CHP-2-0090"></a><a name="IDX-CHP-2-0091"></a><a name="IDX-CHP-2-0092"></a><a name="IDX-CHP-2-0093"></a><a name="IDX-CHP-2-0094"></a></p>
<p><a name="methods"></a></p>
<h5 id="title-ID0EAYNM" class="docSection3Title">Methods</h5>
<p class="docText"><a name="plus sign"></a>Methods are declared outside of the  braces structure. A plus sign (+) identifies the method as a static method,  while a minus sign (-) declares the method as an instance method. Thus, the  <tt>alloc</tt><a name="allocate a"></a> method (to allocate a new object) will  be called using a reference directly to the <tt>MyWidget</tt> class, whereas  methods that are specific to an instance of the <tt>MyWidget</tt> class, such as  <tt>needsBatteries</tt> and <tt>powerOn</tt>, will be invoked on the instance  returned by <tt>alloc</tt>.<a name="IDX-CHP-2-0095"></a><a name="IDX-CHP-2-0096"></a></p>
<p class="docText"><a name="data type"></a>Every declared argument for a method is  represented by a data type, local variable name, and an optional external  variable name. Examples of external variable names in <a class="docLink" href="#sample_interface_open_parenthesis">Example 1</a><a name="are"></a> are  <tt>withMass</tt> and <tt>withGyroscope</tt><a name="that invokes"></a>. The  notifier (calling function) that invokes the method refers to external variable  names, but inside the method the arguments are referenced using their local  variable name. Thus, the <tt>setSpeed</tt><a name="uses the"></a> method uses  the local <tt>_mass</tt> variable to retrieve the value passed as  <tt>withMass</tt>.</p>
<p class="docText"><a name="the declaration"></a>If no external variable name name  is supplied in the declaration, the variable is referenced only with a colon,  for example, <tt>:10.0</tt>.</p>
<p><a name="implementation"></a></p>
<h4 id="title-ID0E2ZNM" class="docSection2Title">Implementation</h4>
<p class="docText"><a name="is"></a>The code suffix for Objective-C source is  <tt>.m</tt><a name="last section"></a>. A skeleton implementation of the widget  class from the last section might look like <a class="docLink" href="#sample_implementation_open_parenthesis">Example 2</a>, which is named  <em>MyWidget.m</em>.<a name="IDX-CHP-2-0097"></a></p>
<p><a name="sample_implementation_open_parenthesis"></a></p>
<h5 id="title-ID0EQ1NM" class="docExampleTitle">Example 2. Sample implementation  (MyWidget.m)</h5>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
<div class="codeSegmentsExpansionLinks">Code View:</div>
<pre>#import "MyWidget.h"

@implementation MyWidget

+ (id)alloc {
}

+ (BOOL)needsBatteries {
    return YES;
}

- (BOOL)powerOn {
    isPoweredOn = YES;
    return YES;
}

- (void)setSpeed:(float)_speed {
    speed = _speed;
}

- (void)setSpeed:(float)_speed withMass:(float)_mass {
    speed = _speed;
    mass = _mass;
}

- (void)setSpeed:(float)_speed withGyroscope:(float)_gyroscope {
    speed = _speed;
    gyroscope = _gyroscope;
}
@end</pre>
</td>
</tr>
</tbody>
</table>
<p class="docText"><a name="within its"></a>Just as the interface was contained  within its own code block, the implementation begins with an  <tt>@implementation</tt> statement and ends with <tt>@end</tt><a name="variables with"></a>. In C++, it is common practice to prefix member  variables with <tt>m_</tt><a name="that public"></a> so that public methods can  accept the name of the variable. This makes it easy to reuse someone else&#8217;s code  because they can deduce a variable&#8217;s purpose by its name. Since Objective-C  allows for an external variable name to be used, the method is able to provide a  sensible name for the developer to use while internally using some proprietary  name. The true name can then be used inside the object, while the method&#8217;s local  variable name is prefixed with an underscore, e.g., <tt>_speed</tt>.</p>
<p><a name="categories"></a></p>
<h4 id="title-ID0EE2NM" class="docSection2Title">Categories</h4>
<p class="docText">Objective-C adds a new element to object-oriented programming  called <span class="docEmphasis">categories</span><a name="are treated"></a>.  Categories were designed to solve the problem where base classes are treated as  fragile to prevent seemingly innocuous changes from breaking the more complex  derived classes. When a program grows to a certain size, the developer can often  become afraid to touch the smaller base classes because it&#8217;s too difficult by  then to determine what changes are safe without auditing the entire application.  Categories provide a mechanism to add functionality to smaller classes without  affecting other objects.<a name="IDX-CHP-2-0098"></a><a name="IDX-CHP-2-0099"></a></p>
<p class="docText"><a name="A category"></a>A category class can be placed &#8220;on  top&#8221; of a smaller class, adding to or replacing methods within the base class.  This can be done without recompiling or even having access to the base classes&#8217;  source code. Categories allows for base classes to be expanded within a limited  scope, so that any objects using the base class (and not the category) will  continue to see the original version. From a development perspective, this makes  it much easier to improve on a class written by a different developer. At  runtime, portions of code using the category will see the new version of the  class, and code using the base class directly will see only the original  version.</p>
<p class="docText"><a name="between categories"></a>The difference between  categories and inheritance is the difference between tricking out your car  versus dressing it up as a parade float. When you soup up your sports car, new  components are added to the internals of the vehicle that cause it to perform  differently. Sometimes components are even pulled out and replaced with new  ones. The act of adding a new component to the engine, such as a turbo, affects  the function of the entire vehicle. This is how inheritance works.</p>
<p class="docText"><a name="the other"></a>Categories, on the other hand, are more  like a parade float in that the vehicle remains completely intact, but cardboard  cutouts and papier-mâché are affixed to the outside of the vehicle so that it  appears different. In the context of a parade, the vehicle is a completely  different animal, but when you take it to the mechanic, it&#8217;s the same old stock  car you&#8217;ve been driving around.</p>
<p class="docText"><a name="type of"></a>The widget factory is coming out with a  new type of widget that can fly through space, but is concerned that making  changes to their base class might break existing applications. By building a  category, applications using the <tt>MyWidget</tt><a name="see the"></a> base  class will continue to see the original class, while the newer space  applications will use a category instead. The following example builds a new  category named <tt>MySpaceWidget</tt> on top of the existing <tt>MyWidget</tt><a name="up in"></a> base class. Because we need the ability to blow things up in  space, a method named <tt>selfDestruct</tt><a name="existing"></a> is added. This  category also replaces the existing <tt>powerOn</tt><a name="here to"></a> method with its own. Contrast the use of parentheses here to hold the  <tt>MySpaceWidget</tt><a name="class with"></a> contained class with the use of  a colon in <a class="docLink" href="#sample_interface_open_parenthesis">Example 1</a> to carry out inheritance.</p>
<pre>#import "MyWidget.h"

@interface MyWidget (MySpaceWidget)
- (void)selfDestruct;
- (BOOL)powerOn;
@end</pre>
<p class="docText"><a class="docLink" href="#sample_category_open_parenthesis_mys">Example 3</a> shows a complete  source file implementing the category.</p>
<p><a name="sample_category_open_parenthesis_mys"></a></p>
<h5 id="title-ID0EY3NM" class="docExampleTitle">Example 3. Sample category  (MySpaceWidget.m)</h5>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
<pre>#import "MySpaceWidget.h"

@implementation MyWidget (MySpaceWidget)

- (void)selfDestruct {
    isPoweredOn = 0;
    speed = 1000.0;
    mass = 0;
}

- (BOOL)powerOn {
    if (speed == 0) {
        isPoweredOn = YES;
        return YES;
    }

    /* Don't power on if the spaceship is moving */
    return NO;
}
@end</pre>
</td>
</tr>
</tbody>
</table>
<p><a name="posing"></a></p>
<h4 id="title-ID0E53NM" class="docSection2Title">Posing</h4>
<p class="docText">In Objective-C, a subclass class can <span class="docEmphasis">pose</span><a name="of all"></a> as one of its superclasses,  virtually replacing it as the recipient of all messages. This is similar to  overriding, only an entire class is being overridden instead of a single method.  A posing class is not permitted to declare any new variables, although it may  override or replace existing methods. Posing is similar to categories in that it  allows a developer to augment an existing class at runtime.<a name="IDX-CHP-2-0100"></a><a name="IDX-CHP-2-0101"></a></p>
<p class="docText"><a name="In past"></a>In past examples, mechanical widget  classes were created. Well, at some point after designing all of these widgets,  perpetual energy was discovered. This allowed many of the newer widgets to be  autonomous, while some legacy widgets still required batteries. Because  autonomous widgets have such a significant amount of different code, a new  object called <tt>MyAutonomousWidget</tt><a name="to override"></a> was derived  to override all of the functionality that has changed, such as the static  <tt>needsBatteries</tt> method. See <a class="docLink" href="#sample_interface_for_posing_open_par">Example 4</a> and <a class="docLink" href="#sample_implementation_for_posing">Example 5</a>.</p>
<p><a name="sample_interface_for_posing_open_par"></a></p>
<h5 id="title-ID0E64NM" class="docExampleTitle">Example 4. Sample interface for  posing (MyAutonomousWidget.h)</h5>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
<pre>#import &lt;Foundation/Foundation.h&gt;
#import "MyWidget.h"

@interface MyAutonomousWidget : MyWidget
{

}

+ (BOOL)needsBatteries;
@end</pre>
</td>
</tr>
</tbody>
</table>
<p><a name="sample_implementation_for_posing"></a></p>
<h5 id="title-ID0EF5NM" class="docExampleTitle">Example 5. Sample implementation  for posing (MyAutonomousWidget.m)</h5>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
<pre>#import "MyAutonomousWidget.h"

@implementation MyAutonomousWidget

+ (BOOL)needsBatteries {
    return NO;
}
@end</pre>
</td>
</tr>
</tbody>
</table>
<p class="docText"><a name="of changing"></a>Instead of changing all of the  existing code to use this class, the autonomous class can simply pose as the  widget class. The <tt>class_poseAs</tt><a name="method to"></a> method is called  from the main program or another high-level method to invoke this behavior:</p>
<pre>    MyAutonomousWidget *myAutoWidget = [ MyAutonomousWidget alloc ];
    MyWidget *myWidget = [ MyWidget alloc ];
    class_poseAs(myAutoWidget, myWidget);</pre>
<p class="docText"><a name="replaced in"></a>At this point, any other methods  we&#8217;ve replaced in the posing class (to change how we talk to autonomous devices)  would pose as the original base class.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2009/12/20/english-transitioning-to-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date formatters examples in Objective-C</title>
		<link>http://www.todo3ds.es/en/2009/12/20/dos-ejemplos-de-como-formatear-fechas-con-objective-c/</link>
		<comments>http://www.todo3ds.es/en/2009/12/20/dos-ejemplos-de-como-formatear-fechas-con-objective-c/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 15:19:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[NSDate]]></category>
		<category><![CDATA[objective c]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/2009/12/20/dos-ejemplos-de-como-formatear-fechas-con-objective-c/</guid>
		<description><![CDATA[Here are several simple examples for displaying date information:
// Date: 10/29/08

NSDate *today = &#91;NSDate dateWithTimeIntervalSinceNow:0&#93;;
NSDateFormatter *dateFormat = &#91;&#91;&#91;NSDateFormatter alloc&#93; init&#93; autorelease&#93;;
&#91;dateFormat setDateStyle:NSDateFormatterShortStyle&#93;;
NSString *dateString = &#91;dateFormat stringFromDate:today&#93;;
NSLog&#40;@&#34;Date: %@&#34;, dateString&#41;;

// Date: 10/29/2008 08:29PM

NSDate *today = &#91;NSDate date&#93;;
NSDateFormatter *dateFormat = &#91;&#91;NSDateFormatter alloc&#93; init&#93;;
&#91;dateFormat setDateFormat:@&#34;MM/dd/yyyy hh:mma&#34;&#93;;
NSString *dateString = &#91;dateFormat stringFromDate:today&#93;;
NSLog&#40;@&#34;Date: %@&#34;, dateString&#41;;
&#91;dateFormat release&#93;;
]]></description>
			<content:encoded><![CDATA[<p>Here are several simple examples for displaying date information:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">// Date: 10/29/08</span><br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> <span style="color: #002200;">*</span>today <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> dateWithTimeIntervalSinceNow<span style="color: #002200;">:</span>0<span style="color: #002200;">&#93;</span>;<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> <span style="color: #002200;">*</span>dateFormat <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/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#91;</span>dateFormat setDateStyle<span style="color: #002200;">:</span>NSDateFormatterShortStyle<span style="color: #002200;">&#93;</span>;<br />
<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>dateString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormat stringFromDate<span style="color: #002200;">:</span>today<span style="color: #002200;">&#93;</span>;<br />
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Date: %@&quot;</span>, dateString<span style="color: #002200;">&#41;</span>;<br />
<br />
<span style="color: #11740a; font-style: italic;">// Date: 10/29/2008 08:29PM</span><br />
<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> <span style="color: #002200;">*</span>today <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> date<span style="color: #002200;">&#93;</span>;<br />
<a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> <span style="color: #002200;">*</span>dateFormat <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#91;</span>dateFormat setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;MM/dd/yyyy hh:mma&quot;</span><span style="color: #002200;">&#93;</span>;<br />
<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>dateString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormat stringFromDate<span style="color: #002200;">:</span>today<span style="color: #002200;">&#93;</span>;<br />
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Date: %@&quot;</span>, dateString<span style="color: #002200;">&#41;</span>;<br />
<span style="color: #002200;">&#91;</span>dateFormat release<span style="color: #002200;">&#93;</span>;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2009/12/20/dos-ejemplos-de-como-formatear-fechas-con-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Specifying Simulator Only Code</title>
		<link>http://www.todo3ds.es/en/2009/12/20/especificar-codigo-solo-en-el-simulador/</link>
		<comments>http://www.todo3ds.es/en/2009/12/20/especificar-codigo-solo-en-el-simulador/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 15:15:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPhone Dev]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[objective c]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=244</guid>
		<description><![CDATA[There are times when you need to write code that is only applicable when working with the simulator. To give the compiler a heads up as to which code block to include, use a compiler directive as shown below:
#if TARGET_IPHONE_SIMULATOR
NSLog&#40;@&#34;Running on Simulator&#34;&#41;;
#else
NSLog&#40;@&#34;Running on Device&#34;&#41;;
#endif
]]></description>
			<content:encoded><![CDATA[<p>There are times when you need to write code that is only applicable when working with the simulator. To give the compiler a heads up as to which code block to include, use a compiler directive as shown below:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#if TARGET_IPHONE_SIMULATOR</span><br />
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Running on Simulator&quot;</span><span style="color: #002200;">&#41;</span>;<br />
<span style="color: #6e371a;">#else</span><br />
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Running on Device&quot;</span><span style="color: #002200;">&#41;</span>;<br />
<span style="color: #6e371a;">#endif</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2009/12/20/especificar-codigo-solo-en-el-simulador/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photopuzzle, new iPhone game</title>
		<link>http://www.todo3ds.es/en/2009/11/06/photopuzzle-un-juego-adictivo-para-tu-iphone/</link>
		<comments>http://www.todo3ds.es/en/2009/11/06/photopuzzle-un-juego-adictivo-para-tu-iphone/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 09:15:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Noticias]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=234</guid>
		<description><![CDATA[You can download this new iPhone game in the App Store, the new Atomic Flavor game. Photopuzzle is a puzzle game, with 10 predef puzzles. You can load images from yor gallery.


]]></description>
			<content:encoded><![CDATA[<p>You can download this new iPhone game in the App Store, the new Atomic Flavor game. Photopuzzle is a puzzle game, with 10 predef puzzles. You can load images from yor gallery.</p>
<div style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="445" height="364" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/eMTHBWfVjeQ&amp;hl=es&amp;fs=1&amp;rel=0&amp;color1=0x006699&amp;color2=0x54abd6&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="445" height="364" src="http://www.youtube.com/v/eMTHBWfVjeQ&amp;hl=es&amp;fs=1&amp;rel=0&amp;color1=0x006699&amp;color2=0x54abd6&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div style="text-align: center;"><a href="itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=334020709&amp;mt=8&amp;s=143441" target="_blank"><img src="http://devimages.apple.com/iphone/marketing/images/marketing_badge.png" border="0" alt="" width="121" height="61" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2009/11/06/photopuzzle-un-juego-adictivo-para-tu-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Audi Q7 added to downloads</title>
		<link>http://www.todo3ds.es/en/2009/09/23/audi-q7-added-to-downloads/</link>
		<comments>http://www.todo3ds.es/en/2009/09/23/audi-q7-added-to-downloads/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 11:59:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured Articles]]></category>

		<guid isPermaLink="false">http://www.todo3ds.es/?p=232</guid>
		<description><![CDATA[You can see download details here:
http://www.todo3ds.es/descargas/modelos/vehiculos/coches/audi-q7/
]]></description>
			<content:encoded><![CDATA[<p>You can see download details here:</p>
<p>http://www.todo3ds.es/descargas/modelos/vehiculos/coches/audi-q7/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.todo3ds.es/en/2009/09/23/audi-q7-added-to-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
