/customers/iconara.net/iconara.net/httpd.www/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Iconara » 2006 » February

Archive for February, 2006

Higher order messaging

Higher order messaging (HOM) is a concept from the world of dynamic object oriented programming languages like Objective-C and Smalltalk. In this article I’m introducing the concept to ActionScript/JavaScript. It’s quite a theoretical concept, but it’s implementation can be very useful, and because of that, I’ll try to not get too boring.

Higher order messaging is similar to passing functions as arguments to functions, as you can do in ActionScript (but not that many other languages, actually), and it’s this aspect we are going to look further into.

Read the rest of this entry →

Architectural Atrocities, part 3: Side effects

In programming, “side effects” refers to things that happen when you call a function or method, besides the returned value. For example, a method might change the UI, log a message or write to a database, and yet return a value at the same time.

Read the rest of this entry →

Architectural Atrocities, part 2: The filters property

Today I wrote a filter tween component. In it self it wasn’t very hard, but ActionScript didn’t help very much. I never cease to be amazed over how bad the ActionScript API:s are (I have a feeling this is how most of my posts are going to start).

Take the filters property of the MovieClip class, you would expect the filter API, which came with Flash 8, to be modern and object oriented, but no. It’s a property, it’s an array that I have to manage by myself, and what’s more: it actually returns another array from the one I set.

Read the rest of this entry →

Architechtural Atrocities, part 1

Introducing the first article in the series Architectural Atrocities in ActionScript. In this series I explore the inconsitencies, oddities and idiocies of the ActionScript API:s. It’s likely to become a long running series, as I don’t see any obvious limit other than the API itself. By the way, who is the architect behind the ActionScript API:s? If anyone knows, please tell me, and I will put him or her on the list of people never to hire.

In this first item on the infinite list, let’s explore the oddities of the BitmapData method applyFilter.

Read the rest of this entry →