THINK

that’s how i naturally know

Archive for July, 2009

XHTML gives way for HTML 5

leave a comment

When XHTML finally begins to unify the browsers and internet experience, the WC3 decides to kill it. The official annoucement as qouted here:

XHTML 2 Working Group Expected to Stop Work End of 2009, W3C to Increase Resources on HTML 5
2009-07-02: Today the Director announces that when the XHTML 2 Working Group charter expires as scheduled at the end of 2009, the charter will not be renewed. By doing so, and by increasing resources in the HTML Working Group, W3C hopes to accelerate the progress of HTML 5 and clarify W3C’s position regarding the future of HTML.

Early adopters are already eargerly testing the new capabilities on Opera browsers. When IE8 decided to implement parts of HTML5, I didn’t actually put much thoguht to it except for the fact that it will take a couple more years before it becomes widespread like XHTML is now (actually, different browser still behave slightly differently under XHTML). But back tracking abit, Google is already very excited about their “Unbelievable product”, Google Wave, being an HTML5 app.

Now, all these early hype is getting me more and more excited about the new offerings, pakaged as HTML 5 APIs that are coming our way. We have some cool Drag and Drop, Geolocation stuff which could bring about even more inventive applications, and finally <video> and <audio> tags that I always wanted.

Written by Jake

July 31st, 2009 at 9:10 am

Posted in Web

Tagged with ,

IE8 sure knows how to push the blame

leave a comment

I was watching some Adobe Acrobat videos over the internet when suddenly IE8 crashed and the tabbed window just closed. Immediately after, a yellow speech bubble (or tooltip box) pops up, pointing at that tab with the following text (roughly).

This tab has been recovered (yes we are the hero)
A problem with the web page CAUSED Internet Explorer to crash!”

Then I switched over to FireFox. The same error happened, but at least FF3 is more modest.

We’re Sorry (don’t worry, it’s ok, foxy)
Firefox had a problem and crashed (not blaming the web page, Adobe, at all). We’ll try to restore your tabs and windows when it restarts.
To help us diagnose and fix the problem, you can send us a crash report.”

So at least FireFox is going to fix the problem for us. Nice work.

Written by Jake

July 29th, 2009 at 3:38 pm

Posted in Web

Tagged with ,

Staying Focused with FocusManager

leave a comment

It just so easy to take things for granted that never would I know that implementing a correct tab order or tab loop for a form can be so mind wrenching. I am totally upset that the Flash authors have to make this so difficult for me.

Posted in serveral forums regarding FocusManager and tab loops but recieved no responses at all. Read many more forums and none of them have conclusive solutions. The Adobe Flash documentation is even worse with its useless example code. Since it appears that this class is so badly documented, I might as well do it myself here.

To immediately create a tab loop for a form, create a DisplayContainer as the form and then add form fields UI components in it. Let’s call the DisplayContainer TheForm

import fl.managers.FocusManager;
var fm:FocusManager = new FocusManager(TheForm);
fm.activate();
// the above code immediately create a tab loop and listens
// for tab key press to advance focus onto the next component

Written by Jake

July 9th, 2009 at 11:53 am

Posted in Programming

Tagged with ,

AS3 passing argument list to functions

leave a comment

It appears that argument list passing is not very well documented in the flash docs for whatever reason. But we know it is possible because the trace() funcion is one such function that accepts an argument list.

the syntax for such a function is acheived by using the tripledot keyword as such

function ExampleConcatString(... str:String):String
{
        var newStr:String = "";

        for(var i = 0; i < str.length; i++)
        {
                newStr+= str[i];
        }

        return newStr;
}

Also, intuitively, argument list should come after default arguments which are before required arguments as such:

function SomeFunc(required:String, optional:Object = null, ... arglist:*)

Written by Jake

July 8th, 2009 at 5:35 pm

Posted in Programming

Tagged with , , ,