NOTE: Sadly I am no longer updating this blog. You can go to my homepage instead.
Nov 05 2010

Tips

Incorrect value in Microsoft Excel LOOKUP function

While developing a spreadsheet that used the LOOKUP function I discovered what appears to be a bug (possibly a rounding error) in Excel. Also, as I have not checked on Windows, this is a Mac OSX issue (Snow Leopard at least). Below I present the error and the solution: The Error The LOOKUP function will [...]

Read the rest of this entry...
Apr 28 2010

Flash Platform | News | Tips | Tools

Auckland Adobe CS5 Roadshow

Under the slogan of design without boundaries, work faster, and streamline critical processes, the CS5 Roadshow kicked off at Skycity Convention Centre in Auckland today. The hosts for the day were Michael “Stod” Stoddart, Mike McHugh, and Paul Burnett. The event covered a broad-range of tips, tricks, and new features of CS5. Questions could be [...]

Read the rest of this entry...
Sep 10 2009

AS3 | Flash | Tips

This isn’t right… MovieClip nested inside Button throwing null object reference error in Flash CS4

A great thing about teaching is that your students approach problems in ways you haven’t done before and run into problems that you never knew existed. This is one such problem in Flash CS4 and a curious one at that. THE PROBLEM: A Button symbol is placed on the Stage on a frame other than [...]

Read the rest of this entry...
Aug 03 2009

AS3 | Tips

Creating a date countdown timer in ActionScript 3 / Flash

Creating a countdown timer in ActionScript is quite easy. The essentials of it are: Specify a target date to countdown to using the Date class. Create a Timer instance to check the countdown time each second or so. At each tick of the timer calculate the number of milliseconds between now and the target date. [...]

Read the rest of this entry...
Apr 21 2009

JavaScript | Tips

Object-Oriented JavaScript Tip: Implementing the Singleton Pattern

The Singleton design pattern is a development approach that ensures only a single instance of a particular class is available in a system. Imagine building the game of chess, you would only want there to be one instance of the board floating around—say an instance of a class called ChessBoard. The Singleton pattern ensures that [...]

Read the rest of this entry...
Apr 09 2009

JavaScript | Tips

Object-Oriented JavaScript Tip: Creating static methods, instance methods

Custom JavaScript objects can have instance methods (function that are associated with a particular JavaScript object), but like other Object-Oriented languages, they can also have static methods, that is functions that are associated with the JavaScript class that created an object, as opposed to the object itself. This is useful in cases where a function [...]

Read the rest of this entry...
Apr 05 2009

JavaScript | Tips

Object-Oriented JavaScript Tip: Overriding toString() for readable object imprints

JavaScript has a core Object class that contains a toString() method that is called whenever a request is made to convert an object to a string (like related ECMAScript-based ActionScript). This is often done during debugging to check that a variable actually contains a reference to a certain object. Most likely alert(myObj) or console.log(myObj) would [...]

Read the rest of this entry...
Mar 25 2009

AS3 | Flash | Tips

Common Flash Compiler Errors: #1046

This error shows the following in the Compiler Errors window: 1046: Type was not found or was not a compile-time constant: [Class name]. Quick Answer and Solution Where I have “[Class name]” above you will have any number of names listed, for example it may say Event, Sprite, TextField, etc. What this means is you [...]

Read the rest of this entry...
Mar 19 2009

AS3 | Flash | Tips

Common Flash Compiler Errors: #1042

This error shows the following in the Compiler Errors window: 1042: The this keyword can not be used in static methods. It can only be used in instance methods, function closures, and global code. Quick Answer and Solution Most likely you are you using the keyword “this” inside a class file, but it is not [...]

Read the rest of this entry...
Mar 14 2009

Drupal | Programming | Tips

2 invaluable Drupal development tips: list all available variables and backtrace a page

The Drupal Devel module includes some invaluable functions that make working with Drupal much much easier. A short list of these functions can be found at this post. One of these is the dpm() command (which I would guess stands for “Drupal Print Message,” or at least that’s how I remember it). Given an array [...]

Read the rest of this entry...