Computer
China likes sources
by Siu Lun on Jun.25, 2009, under Computer, Programming
http://www.sourcewire.com/releases/rel_display.php?relid=LEmmQ
Clearly, they didn’t thought about the chinese particularly within the mainland who simply wants to cut and paste code into their own apps.
What was that news recently…?
Quick Search on Google: http://government.zdnet.com/?p=4961
Eclipse 3.5, Aptana
by Siu Lun on Jun.25, 2009, under Computer, Programming, Web
So Eclipse 3.5 is now out, I’m still downloading it at the moment. However my main focus with this post is on Aptana. That’s my preferred choice to develop web apps in. It just has that one extra step in terms of support during development that makes it better than the phpeclipse and eclipse php projects. I guess most notably being the auto completion for not just php but html and javascript.
But now that 3.5 is out, there is no sign on Aptana to announce support for it. In fact, they’ve been touting support for 3.4 as the basis for the past 6 months but little progress has been made since.
I like Aptana’s development tool, and I have actually paid for the pro version. However, it really seems to me they’ve really shifted their attention to their own ‘cloud’ hosting offering and away from Aptana itself. I can understand that from the revenue perspective, but to be honest, I do not see their cloud offering to be of any use as it is not particularly competitive if you compare it to the existing solutions.
I sincerely hope that Aptana will not forget what made them rise in the first place and will not forget those customers who have paid for Aptana. I suppose what I’m saying is, the least I would expect from Aptana is that they ought to be ‘on-the-ball’ with Eclipse releases to ensure they can support the latest version.
I don’t know, perhaps they got the same mentality as typical linux nerds who believe new versions are always worst when they first come out than the previous and most people would play it safe and use older versions.
I’ve always used the latest of whatever I can get my hands on.
Passing variables to setTimeout in javascript
by Siu Lun on May.29, 2009, under Programming, Web
I’ve been working on a javascript menu effect today. I don’t use javascript enough to remember all the syntax, let alone browser support.
So anyway, I had to use setTimeout in order to delay effect changes for human interactions, but I had to pass a couple of variables. Now following some javascript tutorial sites my original code was like this:
setTimeout(function(a,b) { alert(a+'-'+b); }, 100, 'a input', 'b input');
This worked on Firefox 3 which is my standard dev platform.
When I decide to test on IE though, all I get is ‘undefined’ coming up.
A quick search on the net revealed that I need to actually do:
var a = 'a input';
var b ='b input';
setTimeout(function(){ alert_func(a,b) },100);
function alert_func(a,b){
alert(a+'-'+b);
}
to make it work on IE.
Note: Apparently we also need to do a = null; and b=null; after the alert_func(a,b) call in the inline function in order to avoid a IE memory leak. (Have not tested or confirmed myself)
Tested on: IE8 and IE8 with compatbility mode
Credit goes to: MakeMineATriple’s blog and most of all the comments below it.

