Currently Reading

Image of Derivatives Demystified: A Step-by-Step Guide to Forwards, Futures, Swaps and Options (The Wiley Finance Series)

Image of Working Effectively with Legacy Code (Robert C Martin)

Image of Coders at Work: Reflections on the Craft of Programming

Image of Succeeding with Agile: Software Development Using Scrum (Addison-Wesley Signature)

Image of iPhone UK: The Missing Manual

Image of My Shit Life So Far

Recently Read

Image of Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin)

Image of The Secrets of Consulting: A Guide to Giving and Getting Advice Successfully

Image of Beginning iPhone 3 Development: Exploring the iPhone SDK

Image of Cloud Atlas

Image of Test Driven: TDD and Acceptance TDD for Java Developers

Image of iPhone Advanced Projects (Books for Professionals by Professionals)

Image of UML 2 for Dummies

Image of Test Driven Development (The Addison-Wesley Signature Series)

Image of ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques (Adobe Developer Library)

Image of Refactoring: Improving the Design of Existing Code (Object Technology Series)


March 18, 2009

Unable to Catch IOErrorEvent’s when Loading a ByteArray into an Image

Filed under: ActionScript, Bug Fixes, Flex — Anthony @ 1:07 pm

I was trying to load a byteArray into an image control today and would randomly get an Unhandled IOErrorEvent message. Now this shouldn't really happen as the image control uses a default broken image icon to display when there are any loading problems. Well after trying to catch the error unsuccessfully I wanted to know what was going on.
So i went digging and i found in the base class of image, SWFLoader line 1497 the following (more...)

March 12, 2009

Flex Cookbook Recipe 5.8 Allow Certain items in a list to be selectable, Doesn’t quite work correctly

Filed under: ActionScript, Bug Fixes, Flex — Anthony @ 11:38 am

Ok I needed to disable Heading elements inside a List Component in Flex, and i was being too lazy to work it out for myself so i picked up the Flex cookbook Adobe had been kind enough to send me and yes... It was there. Now the Mouse removal was straight forward and worked like a charm. But the keyboard events were a different story. The code didn't work for several reasons.
1. Key directions were not being assigned.
2. When a disabled item was at either the top or the bottom of the list it would stop you being able to continue down / up the list.
To fix this i added the following code. (more...)

March 9, 2009

Augmented Reality

Filed under: ActionScript, Flex — Anthony @ 10:40 am

I saw this post over on Ryan Stewarts Blog today and thought that i would mention in addition to the FLARToolkit download you can also download the source flex project from Saqoosha's demo at Max Japan here.

March 5, 2009

Salesforce ActionScript Fun

Filed under: ActionScript, Bug Fixes, Flex — Anthony @ 4:41 pm

Ok I have been working with the salesforce API for a couple of days now and I have found it very interesting. However I have found a few things that don't seem to be very clear when trying to simply login to your account from an application that is running outside of the salesforce Sandbox.
So as i have seen a lot of posts about this i have decided to explain how i go about logging in here.

1. To login you need 3 things
1. Username in the form user@user.com
2. Password.
3. Security Token
To get the security token for a user go to setup>Reset your security token. This will then be emailed to you.

Logging into an Administrators account seems to be different than logging into a normal users account.
For Administrators you have to set the protocol to 'http' for normal users set it to 'https' in addition we have to add the token to the password as follows.

 
private var _conn : Connection = new Connection( );
 
private function login( username : String, password : String,
           token : String, isAdmin : Boolean = false ) : void
{
    _connection.protocol = isAdmin ? 'http' : 'https';
    var login : LoginRequest = new LoginRequest( );
	  login.username = value..username;
	  login.password = value..password.toString( )
                                    + value..token.toString( );
	  login.callback = new Responder( loginResult, loginFault );
	 _connection.login( login );
}