Posts Tagged inheritance

Better Ways To Check Class Inheritance

If you want to check if one class inherits another without actually having instances of those classes, you may have read my article on Checking Class Inheritance. However, as the many comments quickly pointed out, the methods of checking this may have some flaws. There were also additional methods posted in the comments that should be added and tested. Today I’m adding them, testing them, and checking all of their validity to find the ultimate approach to check class inheritance.

Read the rest of this entry »

Tags: , , ,

1 Comment

Checking Class Inheritance

I recently received a tip about a thread discussing an interesting problem: how to tell if one Class object represents a class that subclasses another Class object. If you had an instance of the class, you could simply use the is or instanceof keywords, but that won’t do here. Today’s article shows how to solve this tricky problem.

Read the rest of this entry »

Tags: , , , , , , ,

20 Comments

Runnables as Function Pointers

Last Friday’s article expressed some longing for C-style function pointers. It attempted to use AS3′s Namespace class to fake a function pointer. Unfortunately, this resulted in far slower code than simple direct access. Today’s article shows a technique that actually results in far faster code!

Read the rest of this entry »

Tags: , , ,

16 Comments