Archive

Archive for January, 2009

Super xiao

January 21st, 2009 No comments

Remember “Animation vs Animator”? Well this is better!

Tags:

Conference: 2 Days Left for Early Bird Prices

January 14th, 2009 No comments

The PHP Quebec Conference tickets are currently being sold at an early bird price. But that expires soon. In fact, you have until Friday to take advantage of this special price. You can purchase tickets on the Conference website.

With over 50 quality talks and great speakers from around the world, this conference is an event not to miss. Last year, all tickets were sold a month before the event, which is another reason to hurry.

Tags:

Flex Randomness

January 13th, 2009 3 comments

The only reason why your Flex app should do something randomly is by your using the Math.random() function. You can argue about the UIDUtil.createUID() and such but you get the point. Today I witnessed randomness as never before.

Try to run this code (Flex 3.2)

var obj:Object = { a: "valueA", b: "valueB" };
for(var property:String in obj)
{
    trace(property);
}

Sometimes it will output a-b and other times b-a. I have no idea how it determines the order and how come it’s never the same. But it sure caused me some pain. Found a workaround using PHP once received on the back-end!

Tags:

PHP Quebec: Microformats

January 12th, 2009 1 comment

Sarven Capadisli presented “Interacting with microformats” at the PHP Quebec’s January meeting. Microformats are basically a way to convert existing HTML pages into APIs without much effort. You use mostly the class attribute to mark up your HTML so that contact/calendar/atom/etc. could be extracted from it.

A very well structured presentation with cool examples. Read the slides here:
http://csarven.ca/presentations/microformats-04/

Tags: , , ,

if (value is Object) problem

January 8th, 2009 8 comments

To my knowledge, everything is AS3 an object. Functions, Strings, Arrays…

So how do we check if our value is actually an Object? I had this problem in a for loop. I wanted to treat primitive types, Arrays and Objects differently. My first reaction was to test for Arrays, then for Objects and handle the rest in the else block. Well remember that if you check if a String is an Object, you’ll get a false positive.

Solution:

var className:Object = getQualifiedClassName(value);
if (className == 'Object') {
    // do stuff here
} 
else if (className == 'Array') {
    // do stuff here
}  
else {
    // do stuff here
} 
Tags: ,