<?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>deleteaso &#187; Tutorials</title>
	<atom:link href="http://deleteaso.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://deleteaso.com</link>
	<description>When something's not working delete aso files</description>
	<lastBuildDate>Tue, 25 Oct 2011 13:32:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Creating AIR Native Extensions for BlackBerry PlayBook</title>
		<link>http://deleteaso.com/creating-air-native-extensions-for-blackberry-playbook/</link>
		<comments>http://deleteaso.com/creating-air-native-extensions-for-blackberry-playbook/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 13:32:42 +0000</pubDate>
		<dc:creator>julian</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[ANE]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[playbook]]></category>

		<guid isPermaLink="false">http://deleteaso.com/?p=280</guid>
		<description><![CDATA[The PlayBook NDK 1.0 was released at BlackBerry DevCon Americas 2011 this week and with it comes the ability to create AIR Native Extensions. AIR Native Extensions is one of the big features available in AIR 3.0 on all other platforms. However, Native Extensions have been available in the AIR Runtime on the PlayBook since [...]]]></description>
			<content:encoded><![CDATA[<p>The PlayBook NDK 1.0 was released at BlackBerry DevCon Americas 2011 this week and with it comes the ability to create AIR Native Extensions. AIR Native Extensions is one of the big features available in AIR 3.0 on all other platforms. However, Native Extensions have been available in the AIR Runtime on the PlayBook since it launched. So when developing your application and your ANE, it is not necessary to target AIR 3.0. You can target AIR 2.7 and the BlackBerry Tablet OS 1.0.7 if you like.</p>
<h2>Pre-requisites</h2>
<p>In order to create an ANE you will need to download and install the following tooling.</p>
<p><strong>PlayBook NDK 1.0</strong> &#8211; <a href="https://bdsc.webapps.blackberry.com/native/" target="_blank">https://bdsc.webapps.blackberry.com/native/</a><br />
Once installed, this is what you will use to develop the native portion of our ANE.</p>
<p><strong>Flash Builder 4.6</strong> public pre-release – <a href="http://adobe.ly/qGRD3d" target="_blank">http://adobe.ly/qGRD3d</a><br />
The current release version of Flash Builder, 4.5.1, does not contain support for ANE development. It is possible to use it with lots of work arounds, but it is better to simply sign up for the pre-release of 4.6.</p>
<p>Currently Flash Builder 4.6 only comes with the Flex 4.6 SDK, which requires you to have AIR 3.1, even if you are only creating an ActionScript project. So to get around this, I would recommend copying the 4.5.1 SDK from your Flash Builder 4.5/sdks folder before un-installing it and installing Flash Builder 4.6. This will allow you to develop ANE’s and target AIR 2.7.</p>
<p>Or you can download the latest Flex 4.5.1 SDK from the Flex open source site here. <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5 " target="_blank">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5 </a>You will then need to download the AIR SDK and overlay it on top of the Flex SDK.<br />
AIR SDK download &#8211; <a href="http://www.adobe.com/special/products/air/sdk/" target="_blank">http://www.adobe.com/special/products/air/sdk/</a><br />
Overlay instructions &#8211; <a href="http://kb2.adobe.com/cps/495/cpsid_49532.html" target="_blank">http://kb2.adobe.com/cps/495/cpsid_49532.html</a></p>
<p>Hopefully that wasn’t too painful to get up and running and as more of these tools get officially released it will become easier.</p>
<p>Source code for the native and ActionScript implementations as well as a sample application can be downloaded <a href="http://deleteaso.com/downloads/anetutorial.zip">here</a>.</p>
<h2>Developing the native library</h2>
<p>Before you can start coding the native side there are a couple of things that are required in order to set up your project correctly.</p>
<p>First create a new project.<br />
<strong>File &gt; New &gt; BlackBerry Tablet OS C/C++ Project</strong></p>
<p><strong><img class="alignnone" title="new project" src="http://deleteaso.com/images/anetutorial/newproject.png" alt="" width="600" height="400" /><br />
</strong></p>
<p>After you create name for you project you will be asked to select what type of project to create.  Make sure to select <strong>Shared Library  &gt; Empty Project</strong>.</p>
<p><img class="alignnone" title="shared library" src="http://deleteaso.com/images/anetutorial/sharedlibrary.png" alt="" width="600" height="517" /></p>
<p>When you press Finish your project will be created. Once created select <strong>Project &gt; Properties</strong>.</p>
<p>The Project Properties dialog is presented and we need to add the AirStub library to your build configuration.<br />
<strong>1.	Select C/C++ Build &gt; Settings from the left menu.</strong><br />
<strong> 2.	Select QCC Linker &gt; Libraries</strong><br />
<strong> 3.	Click the “+” Button in the Libraries Section.</strong><br />
<strong> 4.	Enter “AirStub” into the prompt.</strong></p>
<p><strong><img class="alignnone" title="air stub" src="http://deleteaso.com/images/anetutorial/airstub.png" alt="" width="600" height="483" /><br />
</strong></p>
<p>You will need to do this to every Build Configuration you plan on using. To add the AirStub library to another configuration, select it from the Configuration drop down at the top of the dialog.</p>
<p>With that your project is ready to start coding. Create a new Source File and name it main.c, or something similar.</p>
<p>Throughout this article I will explain some of the native code, as we show some simple examples of how to interact with native code. For more information on all of the C methods read through the documentation on Adobe’s web site. <a href="http://help.adobe.com/en_US/air/extensions/index.html" target="_blank">http://help.adobe.com/en_US/air/extensions/index.html</a></p>
<p>You can also look through the FlashRuntimeExtensions.h header file to find all of the methods and properties.</p>
<p>I have attached a sample project that with this article and in the next section will explain the pieces of it.</p>
<h2>Initializing the extension</h2>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> ExtInitializer<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #339933;">**</span> extDataToSet<span style="color: #339933;">,</span> FREContextInitializer<span style="color: #339933;">*</span> ctxInitializerToSet<span style="color: #339933;">,</span>
FREContextFinalizer<span style="color: #339933;">*</span> ctxFinalizerToSet<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">*</span>extDataToSet <span style="color: #339933;">=</span> NULL<span style="color: #339933;">;</span>
<span style="color: #339933;">*</span>ctxInitializerToSet <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span>ContextInitializer<span style="color: #339933;">;</span>
<span style="color: #339933;">*</span>ctxFinalizerToSet <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span>ContextFinalizer<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The ExtInitializer method is called when your extension is initialized by your application. The method can be called whatever you want and is defined later on. However, the method signature must match the FREInitializer(). For more info check out the documentation here<a href="http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b141a93a0d1129383bfc42-8000.html"> http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b141a93a0d1129383bfc42-8000.html</a></p>
<p>This method sets pointers to the ContextInitializer and ContextFinalizer methods. Next let’s have a look at the ContextInitializer.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> ContextInitializer<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #339933;">*</span> extData<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> uint8_t<span style="color: #339933;">*</span> ctxType<span style="color: #339933;">,</span>
FREContext ctx<span style="color: #339933;">,</span> uint32_t<span style="color: #339933;">*</span> numFunctionsToSet<span style="color: #339933;">,</span>
<span style="color: #993333;">const</span> FRENamedFunction<span style="color: #339933;">**</span> functionsToSet<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #993333;">static</span> FRENamedFunction s_classMethods<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">const</span> uint8_t <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span><span style="color: #ff0000;">&quot;helloNative&quot;</span><span style="color: #339933;">,</span> NULL<span style="color: #339933;">,</span> helloNative<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">const</span> uint8_t <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span><span style="color: #ff0000;">&quot;getElementAt&quot;</span><span style="color: #339933;">,</span> NULL<span style="color: #339933;">,</span> getElementAt<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">const</span> uint8_t <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span><span style="color: #ff0000;">&quot;updateBitmap&quot;</span><span style="color: #339933;">,</span> NULL<span style="color: #339933;">,</span> updateBitmap<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #993333;">const</span> <span style="color: #993333;">int</span> c_methodCount <span style="color: #339933;">=</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span>s_classMethods<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span>FRENamedFunction<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Update caller with the required data</span>
<span style="color: #339933;">*</span>functionsToSet <span style="color: #339933;">=</span> s_classMethods<span style="color: #339933;">;</span>
<span style="color: #339933;">*</span>numFunctionsToSet <span style="color: #339933;">=</span> c_methodCount<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Your context initializer method can be called anything as long as it matches the FREContextInitializer(). For more information have a look at the documentation here.<br />
<a href="http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b14-62b8e11f12937b86be4-7ffd.html">http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b14-62b8e11f12937b86be4-7ffd.html</a></p>
<p>The purpose of this method is to set up a mapping to all of your methods that will be called from ActionScript. In our example we have 3 methods, helloNative, getElementAt, and updateBitmap. The first argument in the  s_classMethods elements is the string that will be used to call the method from ActionScript. You will see how this works later on when we look at developing the ActionScript side.</p>
<p>The third argument is a reference to the native method. Although these 2 names can be different, it is best practice to keep them the same.</p>
<p>Once your methods are defined, update the pointers that where passed in to the function with the methods and the method count.</p>
<p>Before we look at the implementation of the native methods lets quickly take a look at the finalizer methods.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> ContextFinalizer<span style="color: #009900;">&#40;</span>FREContext ctx<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>When your extension context is unloaded the above method will be called. This is the opportunity to do any cleanup and dispose of any objects in your extension.</p>
<h2>Creating native methods</h2>
<p>Now that our methods are defined in our context initializer let’s create the native methods. All of the methods need to have the same method signature – FREFunction() &#8211; <a href="http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b14-62b8e11f12937b86be4-7ffa.html">http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b14-62b8e11f12937b86be4-7ffa.html</a></p>
<p>Here is what our helloNative method looks like.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">FREObject helloNative<span style="color: #009900;">&#40;</span>FREContext ctx<span style="color: #339933;">,</span> <span style="color: #993333;">void</span><span style="color: #339933;">*</span> functionData<span style="color: #339933;">,</span> uint32_t argc<span style="color: #339933;">,</span> FREObject argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The first argument, FREContext ctx, is the context of the extension.<br />
The second argument, void* functionData, is native data passed to the method. When setting up a mapping of the methods in the context initializer, the second parameter of the object was NULL. You could have created some data and had it passed in as this argument to our function.<br />
The third argument, uint32_t argc, is the number of arguments passed from ActionScript.<br />
The fourth argument, FREObject argv[], is an array of all the arguments passed from ActionScript.</p>
<p>The FREObject represents any ActionScript object of any data type. Every object passed from ActionScript will be of this type and every object returned from native to ActionScript must be of this type. You can see that the method signature for the method returns an FREObject. It is up to the native code to convert an FREObject into a native data type so it can work with it. Fortunately there are a number of methods to help with this. Here is a list of them and based on the name it should be fairly straightforward what does what.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">FREGetObjectAsInt32 <span style="color: #009900;">&#40;</span> FREObject object<span style="color: #339933;">,</span> int32_t  <span style="color: #339933;">*</span>value <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
FREGetObjectAsUInt32<span style="color: #009900;">&#40;</span> FREObject object<span style="color: #339933;">,</span> uint32_t <span style="color: #339933;">*</span>value <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
FREGetObjectAsDouble<span style="color: #009900;">&#40;</span> FREObject object<span style="color: #339933;">,</span> <span style="color: #993333;">double</span>   <span style="color: #339933;">*</span>value <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
FREGetObjectAsBool  <span style="color: #009900;">&#40;</span> FREObject object<span style="color: #339933;">,</span> uint32_t <span style="color: #339933;">*</span>value <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
FREGetObjectAsUTF8<span style="color: #009900;">&#40;</span> FREObject object<span style="color: #339933;">,</span> uint32_t<span style="color: #339933;">*</span> length<span style="color: #339933;">,</span><span style="color: #993333;">const</span> uint8_t<span style="color: #339933;">**</span> value <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Suppose the first argument passed into your method was an int. You would do the following to convert the value.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">int32_t index<span style="color: #339933;">;</span>
FREGetObjectAsInt32<span style="color: #009900;">&#40;</span> argv<span style="color: #009900;">&#91;</span> <span style="color: #0000dd;">0</span> <span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span>index <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Setting a native data type to an FREObject to return to ActionScript is pretty much the same, but the reverse. You can see an example of this in the implementation of the helloNative method.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>out <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Hello Native<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
FREObject result<span style="color: #339933;">;</span>
FRENewObjectFromUTF8<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>uint32_t<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>strlen<span style="color: #009900;">&#40;</span>out<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span>uint8_t<span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span> out<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span>result<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>These few simple concepts are the basics for creating native methods for ActionScript to call. The getElementAt() method shows how to easily access elements in an Array using native methods. The updateBitmap() method shows how to modify a BitmapData object from ActionScript and have it re-drawn with the new values. These examples should get you started on creating the native code for your ANE.</p>
<h2>Coding the ActionScript implementation</h2>
<p>Included in the sample there is a Flash Builder 4.6 Flex Library project called firstane. This project includes the ActionScript implementation of our ANE. The FirstANE class has 3 methods that mimic our native methods. It is good practice to do this whenever possible so methods are easy to map across the 2 code bases.</p>
<h2>Creating the extension context</h2>
<p>In the constructor of the class we create a reference in ActionScript to our extension context.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">ext = ExtensionContext.createExtensionContext<span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;qnx.extensions.FirstANE&quot;</span>, <span style="color: #0033ff; font-weight: bold;">null</span> <span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>The first argument is the ID of the extension. This can be anything you like, but should be something that is unique to you. Reverse domain is always a great standard. Later in this article we’ll show where to define this.</p>
<p>The second argument is an optional context type. This is passed to the context initialization method so that the native code can initialize different implementation based on a context. Most extensions will not require this, but more complicate extensions it may be useful.</p>
<p>Once we have a reference to the extension, native methods are now available to be called. Calling native methods are really simple. If we have a look at the getElementAt() method it shows how to call a native method with arguments and return the result from the native code.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> getElementAt<span style="color: #000000;">&#40;</span> items<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span>, <span style="color: #004993;">index</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> <span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000000;">&#40;</span> ext.<span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;getElementAt&quot;</span>, items, <span style="color: #004993;">index</span> <span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">String</span> <span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>To call any native method the ExtensionContext.call() method is used &#8211; <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExtensionContext.html#call()">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExtensionContext.html#call()</a></p>
<p>The first parameter is the string that you used in the context initializer. This is the method that we are going to call.</p>
<p>The second and third parameters are arguments that are passed to the native method.</p>
<p>The returned value of the call() method is the value returned from the native method. Because this could be any data type, it is necessary to cast it to the type that the method is expecting.</p>
<h2>Defining the extension</h2>
<p>In the bin folder of the firstane project there is an extension.xml file. This is the file that is used to define the extension. Here is what it looks like.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extension</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/air/extension/2.5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>qnx.extensions.FirstANE<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;versionNumber<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/versionNumber<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;platforms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;platform</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;QNX-ARM&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;applicationDeployment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nativeLibrary<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>libfirstane.so<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nativeLibrary<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;initializer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ExtInitializer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/initializer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	          	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalizer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ExtFinalizer<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalizer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/applicationDeployment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/platform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/platforms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/extension<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The  node is the root node and the version at the end must be 2.5. This value is not the same as the AIR Runtime version you are targeting. Even if your application is targeting AIR 3.0,  the extension namespace must be http://ns.adobe.com/air/extension/2.5.</p>
<p>The  node is extension id is defined. This is the same value that is passed into the ExtensionContext.createExtensionContext() method in ActionScript.</p>
<p>The  is the version number of your extension.</p>
<p>The  node is a list of  nodes that define all of the platforms the extension supports.</p>
<p>The BlackBerry PlayBook supports 2 platforms, QNX-ARM for the PlayBook hardware, and QNX-x86 for the PlayBook Simulator.</p>
<p>One thing that is a really good idea is to implement a default platform for when application runs on a platform that is not supported. For, example you may create native libraries for both the PlayBook device and simulator, but what happens when you want to test your application locally on your development machine. If the API’s only exist on the PlayBook platforms your application will not run locally on Windows or OSX. To accomplish this you can create a “default” platform that is ActionScript only. This allows you to implement default behavior for your API and allow you to fail gracefully or provide alternate implementations.</p>
<p>For more details on the extension descriptor file check out the Adobe documentation here. <a href="http://help.adobe.com/en_US/air/extensions/WS901d38e593cd1bac-3004221412afa24c001-8000.html">http://help.adobe.com/en_US/air/extensions/WS901d38e593cd1bac-3004221412afa24c001-8000.html</a></p>
<h2>Compiling the extension</h2>
<p>In order to compile the extension you must use the adt command line tool that comes with the AIR SDK.</p>
<p>First you must un-zip the firstane.swc. SWC files are simply zip files that contain a library.swf and a catalog.xml. You will need the library.swf to be compiled with each platform, and it must be named library.swf. You can dispose the catalog.xml file, as it is not needed.</p>
<p>To make life easier I have placed the firstane.so, firstane.swc, library.swf, and extension.xml all in the same directory. Here is the command to compile your ane.</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">adt –package –target ane firstane.ane extension.xml –swc firstane.swc –platform QNX-ARM –C . firstane.so library.swf</pre></div></div>

<p>For BlackBerry PlayBook ANE files it is not necessary to sign them and is optional.</p>
<h2>Using a ANE</h2>
<p>In order to use an ANE, it is best to simply follow the instructions in the Flash Builder 4.6 pre-release site. The only difference for the BlackBerry platform is an additional permission is needed in the apps blackberry-tablet.xml file.</p>
<p>run_air_native</p>
<p>Included in the source is a Flash Builder project called firstaneapp that shows how to use the application. You will most likely have to fix the path to the .ane in the project file, but it should give you an idea on how to use it.</p>
<h2>Conclusion</h2>
<p>Hopefully this gets you started in creating ActionScript Native Extensions for the BlackBerry PlayBook. All of the C API documentation from Adobe on ANE’s applies to the PlayBook. With all of the documentation out there, this article and the sample projects, hopefully it gets you well under way.</p>
]]></content:encoded>
			<wfw:commentRss>http://deleteaso.com/creating-air-native-extensions-for-blackberry-playbook/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Sparkfun&#8217;s 7-Segment Red 6.5&#8243; Display and Arduino</title>
		<link>http://deleteaso.com/sparkfuns-7-segment-red-65-display-and-arduino/</link>
		<comments>http://deleteaso.com/sparkfuns-7-segment-red-65-display-and-arduino/#comments</comments>
		<pubDate>Sat, 30 May 2009 20:37:13 +0000</pubDate>
		<dc:creator>julian</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[publications]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://deleteaso.com/?p=164</guid>
		<description><![CDATA[A little while ago I purchased 10 of Sparkfun&#8217;s 7-segment red 6.5&#8243; displays. http://www.sparkfun.com/commerce/product_info.php?products_id=8530 I had been wanting to purchase them for quite some time but they had been out of stock. When I was finally notified that they had received more I instantly bought them, without really thinking what I was going to use [...]]]></description>
			<content:encoded><![CDATA[<p>A little while ago I purchased 10 of Sparkfun&#8217;s 7-segment red 6.5&#8243; displays.</p>
<p><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8530" target="_blank">http://www.sparkfun.com/commerce/product_info.php?products_id=8530</a></p>
<p>I had been wanting to purchase them for quite some time but they had been out of stock. When I was finally notified that they had received more I instantly bought them, without really thinking what I was going to use them for. Once they arrived I quickly opened them up and saw that it was going to be a little bit more of a challenge then I originally thought it would be. And I also thought they would come with some fancy schematic that I could just follow, but they didn&#8217;t.</p>
<p>So the first step was just to try and get a segment to light up by just supplying power. The digits use a common anode, which means it has one lead connection and 7 ground connection for each segment. So I started running it through a 5v power supply with not luck. Then a 9v, still no luck. Finally 12v did the trick. After I soldered wires to all of the connection I was able to get all 7 segments to light up by just running the common anode to the power and each segment to a ground.</p>
<p><a href="http://www.flickr.com/photos/tfan/3579607606/?rotated=1&amp;cb=1243714573465"><img class="alignnone" title="Segement Displays" src="http://farm4.static.flickr.com/3348/3579607606_e66b7bb94c.jpg?v=1243714572" alt="" width="500" height="375" /></a></p>
<p>Ok so step one complete now to try and get it talking with Arduino. Now I wasn&#8217;t really sure how to go about doing this since each segment was connected to a ground. So I started digging around on the Arduino forums and found some similar posts on what I was trying to do. My conclusion was that I need to get a shift register to turn each segment on and off. I found some people who had some luck with this display and the <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=620-1165-5-ND" target="_blank">Allegro 6278EAT</a>. You can pick some up for $1.55 at Digi Key. There are lots of different LED drivers out there but the reason I chose this one was because I needed to supply 12v to my displays and it sounded like some of the others that people where recommending wouldn&#8217;t work.</p>
<p>So after a lot of experimenting and researching I was finally able to get the display to turn on and off with Arduino. This <a href="http://arduino.cc/en/Tutorial/ShiftOut" target="_blank">tutorial</a> on the Arduino site was the most helpful. And I used the following Arduino sketch which I got from this <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1212882269;start=all" target="_blank">post</a> on the forums.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> dataPin <span style="color: #339933;">=</span> <span style="color: #0000dd;">11</span><span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> clockPin <span style="color: #339933;">=</span> <span style="color: #0000dd;">12</span><span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> latchPin <span style="color: #339933;">=</span> <span style="color: #0000dd;">10</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//holders for infromation you're going to pass to shifting function</span>
byte dataRED<span style="color: #339933;">;</span>
&nbsp;
byte dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">11</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//set pins to output because they are addressed in the main loop</span>
  pinMode<span style="color: #009900;">&#40;</span>latchPin<span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Arduino doesn't seem to have a way to write binary straight into the code</span>
  <span style="color: #666666; font-style: italic;">//so these values are in HEX.  Decimal would have been fine, too.</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x3F</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//00111111 - 0</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x06</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//00000110 - 1</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x5B</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01011011 - 2</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x4F</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01001111 - 3</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x66</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01100110 - 4</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">5</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x6D</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01101101 - 5</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">6</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x7D</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01111101 - 6</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">7</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x07</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//00000111 - 7</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">8</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x7F</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01111111 - 8</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">9</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x67</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//01100111 - 9</span>
  dataArrayRED<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #208080;">0x80</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//decimal point</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #0000dd;">11</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
&nbsp;
  dataRED <span style="color: #339933;">=</span> dataArrayRED<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//ground latchPin and hold low for as long as you are transmitting</span>
&nbsp;
    digitalWrite<span style="color: #009900;">&#40;</span>latchPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//move 'em out</span>
&nbsp;
    shiftOut<span style="color: #009900;">&#40;</span>dataPin<span style="color: #339933;">,</span> clockPin<span style="color: #339933;">,</span> dataRED<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//return the latch pin high to signal chip that it</span>
    <span style="color: #666666; font-style: italic;">//no longer needs to listen for information</span>
    digitalWrite<span style="color: #009900;">&#40;</span>latchPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// the heart of the program</span>
<span style="color: #993333;">void</span> shiftOut<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> myDataPin<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> myClockPin<span style="color: #339933;">,</span> byte myDataOut<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// This shifts 8 bits out MSB first,</span>
  <span style="color: #666666; font-style: italic;">//on the rising edge of the clock,</span>
  <span style="color: #666666; font-style: italic;">//clock idles low</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//internal function setup</span>
  <span style="color: #993333;">int</span> i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
  <span style="color: #993333;">int</span> pinState<span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>myClockPin<span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>myDataPin<span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//clear everything out just in case to</span>
  <span style="color: #666666; font-style: italic;">//prepare shift register for bit shifting</span>
  digitalWrite<span style="color: #009900;">&#40;</span>myDataPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  digitalWrite<span style="color: #009900;">&#40;</span>myClockPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//for each bit in the byte myDataOut…</span>
  <span style="color: #666666; font-style: italic;">//NOTICE THAT WE ARE COUNTING DOWN in our for loop</span>
  <span style="color: #666666; font-style: italic;">//This means that %00000001 or &quot;1&quot; will go through such</span>
  <span style="color: #666666; font-style: italic;">//that it will be pin Q0 that lights.</span>
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">7</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    digitalWrite<span style="color: #009900;">&#40;</span>myClockPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//if the value passed to myDataOut and a bitmask result</span>
    <span style="color: #666666; font-style: italic;">// true then... so if we are at i=6 and our value is</span>
    <span style="color: #666666; font-style: italic;">// %11010100 it would the code compares it to %01000000</span>
    <span style="color: #666666; font-style: italic;">// and proceeds to set pinState to 1.</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> myDataOut <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#123;</span>
	pinState<span style="color: #339933;">=</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span>
    <span style="color: #009900;">&#123;</span>
	pinState<span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Sets the pin to HIGH or LOW depending on pinState</span>
    digitalWrite<span style="color: #009900;">&#40;</span>myDataPin<span style="color: #339933;">,</span> pinState<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//register shifts bits on upstroke of clock pin</span>
    digitalWrite<span style="color: #009900;">&#40;</span>myClockPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//zero the data pin after shift to prevent bleed through</span>
    digitalWrite<span style="color: #009900;">&#40;</span>myDataPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//stop shifting</span>
  digitalWrite<span style="color: #009900;">&#40;</span>myClockPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And here is a final diagram for connecting it to Arduino.</p>
<p><a href="http://www.flickr.com/photos/tfan/3579173968/"><img class="alignnone" title="1 segment diagram" src="http://farm4.static.flickr.com/3315/3579173968_2fc55360eb.jpg?v=0" alt="" width="500" height="287" /></a></p>
<p>NOTE: the diagram shows a 15kohm resistor but it may not be bright enough. If you put a 2.2kohm resistor it will be much brighter</p>
<p>And here is a video of the display counting &#8211; <a href="http://www.viddler.com/explore/julian/videos/14/" target="_blank">http://www.viddler.com/explore/julian/videos/14/</a></p>
<p>I am working on getting more then one display working and will write a new post when I do</p>
]]></content:encoded>
			<wfw:commentRss>http://deleteaso.com/sparkfuns-7-segment-red-65-display-and-arduino/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Subversion locally on OSX</title>
		<link>http://deleteaso.com/installing-subversion-locally-on-osx/</link>
		<comments>http://deleteaso.com/installing-subversion-locally-on-osx/#comments</comments>
		<pubDate>Mon, 18 May 2009 23:30:51 +0000</pubDate>
		<dc:creator>julian</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://deleteaso.com/?p=156</guid>
		<description><![CDATA[I have been working on getting Subversion installed on my Mac for the last couple of days in preparation for my talk at Flashbelt on Automatic Build Systems. &#60;Intermission&#62; As a quick plug. Flashbelt is one of the best Flash conferences in the world and I highly recommend going if you are in the area. [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on getting Subversion installed on my Mac for the last couple of days in preparation for my talk at <a href="http://flashbelt.com/#/speakers/julian_dolce/" target="_blank">Flashbelt on Automatic Build Systems</a>.</p>
<p>&lt;Intermission&gt;</p>
<p>As a quick plug. Flashbelt is one of the best Flash conferences in the world and I highly recommend going if you are in the area. I have some discount codes if you are planning on getting tickets within the next couple of weeks. Just leave a comment and I will send you one.</p>
<p>&lt;/Intermission&gt;</p>
<p>Ok back on topic. There are a couple great posts out there that do a great job at explaining how to install Subversion on your Mac, but unfortunately they are a little out of date. So let&#8217;s do a little homework first.</p>
<p><strong>Step 1.</strong></p>
<p>Check what version of Subversion you are running. To do that open a Terminal window and type</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #7a0874; font-weight: bold;">help</span></pre></div></div>

<p>This is assuming you already have the Subversion binaries installed. If you don&#8217;t you can download them from <a href="http://subversion.tigris.org/getting.html#osx" target="_blank">here</a>.</p>
<p>In the first couple of lines in the output from that command it should say what version you are running.</p>
<p><strong>Step 2.</strong></p>
<p>Step 2 is just to follow all of the instructions on the following<a href="http://shawnboyce.wordpress.com/2008/01/06/installing-subversion-server-on-leopard/" target="_blank">Thought Stream post</a>. This takes you through the simple process of getting Subversion set up with Web DAV and working with localhost. If you have Subversion 1.4 installed then you are finished after these instructions. If you have a newer version then 1.4 come back for Step 3 after you are done.</p>
<p><strong>Step 3.</strong></p>
<p>Now we have to update the SVN Apache modules with the current version you have installed. If you kept the default path when installing Subversion navigate to /opt/subversion/lib/svn-apache.</p>
<p>In this directory there are 2 new .so files. All you need to do is overwrite the current modules in apache. To do that simply copy those 2 files to the following directory &#8211; /usr/libexec/apache</p>
<p>It may be a good idea to backup the original files but you should be ok if you didn&#8217;t. Once the new files are copied over you have successfully updated the SVN apache modules.</p>
<p><strong>Step 4.</strong></p>
<p>Now there is 1 last thing you will need to do in order to get everything working correctly. I am not even going to try and explain it because this post on <a href="http://www.thoughtspark.org/node/19" target="_blank">Thought Spark</a> explains it way better then I could ever do.</p>
<p><strong>Step 5.</strong></p>
<p>Everything should be all set now. All you have to do is restart apache and you should be able to navigate to your http://localhost/svn/games or whatever you named your repository and see the current revision.</p>
<p>To restart apache you can either un-check and check the Web Sharing checkbox in System Preferences &gt; Sharing or you can use the following command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://deleteaso.com/installing-subversion-locally-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Papervision3D tutorial</title>
		<link>http://deleteaso.com/great-papervision3d-tutorial/</link>
		<comments>http://deleteaso.com/great-papervision3d-tutorial/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 02:27:48 +0000</pubDate>
		<dc:creator>julian</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://deleteaso.com/great-papervision3d-tutorial/</guid>
		<description><![CDATA[There is a great Papervision3D tutorial over at the Web Development Blog. I had the opportunity to work with Papervision3D on our Volksdragon website we did a couple of weeks back and it was pretty easy to get something up and running pretty quickly. We didn&#8217;t really use it for anything earth shattering, which had [...]]]></description>
			<content:encoded><![CDATA[<p>There is a great <a href="http://rozengain.com/?postid=28" target="_blank">Papervision3D tutorial</a> over at the Web Development Blog. I had the opportunity to work with Papervision3D on our <a href="http://www.volksdragon.com" target="_blank">Volksdragon</a> website we did a couple of weeks back and it was pretty easy to get something up and running pretty quickly. We didn&#8217;t really use it for anything earth shattering, which had to do more with not having as much time as I would have liked to play around with it, but the tutorial should get you up and running pretty quickly. I am really looking forward to getting to play around with the AS3 version of it when Flash CS3 comes out in a couple of weeks. The Papervision team has done a awesome job and I encourage everyone to give it a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://deleteaso.com/great-papervision3d-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

