Wednesday, November 17, 2010

e-Kalappai 3.0 Unveiled!

Finally, Mugunth and volunteers of thamizha.com came out with a successful Open source keyboard manager software e-Kalappai 3.0 (5.19MB). Currently e-Kalappai 3.0 supports Tamil language unicode text input with five keyboard layouts such as Tamil99, Phonetic, Typewriter, Bamini, Inscript in windows operating systems. It was written in C++ using Nokia's Qt Framework. e-Kalappai can be extended to any language as it is open source. Now e-Kalappai claims to be the first open source keyboard manager for Tamil language.

e-Kalappai is a popular freeware used by lot of Tamils around the globe for typing Tamil in computers. With the release of Ver 3.0, e-Kalappai became free software (GNU GPL License) too. This is a good news for the Tamil community. Kudos to Mugunth & Thamizha volunteers for taking this excellent initiative. I hope that the future versions of e-Kalappai will enable the input of other languages also.

Previous versions (1.0 and 2.0) of e-Kalappai were freeware (not free software) built using a third party proprietary Software called Tavulte Keyman(http://www.tavultesoft.com/). While trying to enhance e-Kalappai to the next level, Thamizha Team could not upgrade ekalappai 2.0b to new version since Tavultesoft didn't agreed for an OEM license for their latest Keyman software to create free eKalappai 3.0. So, Mugunth decided to rewrite the entire e-Kalappai from the scratch and release it under GNU GPL License as open source software.

He started working seriously on e-Kalappai 3.0 for windows platform from January 2010. In the mean time, some of his friends and ex-colleague Vijay Gupta joined hands with him for the development and testing of e-Kalappai 3.0 . Read mugunth's Blog post to know about his development experience.

Previously, beta versions of e-Kalappai 3.0 were released to the public for testing. After fixing all the reported bugs e-Kalappai 3.0 final was released by November 2010. Mugunth revamped his thamizha.com website and hosted e-Kalappai 3.0 binary installer files in that. Now you can download the latest version of e-Kalappai from thamizha website http://thamizha.com/project/ekalappai.

A post (written in Tamil with some screenshots) about e-Kalappai 3.0 and its features could be found at EzilNila website http://ezilnila.com/archives/1672

If you would like to take part in the development / testing of future versions of e-Kalappai, go through this link http://code.google.com/p/ekalappai/ . Source code of e-Kalappai 3.0 can also be downloaded from the above mentioned site.

Friday, October 29, 2010

A simple calculator using Adobe Flash Builder 4.0

Flex SDK is a free and open source product and can be downloaded from adobe's site
Flex is developer centric and so it does not have timelines, animation, movie clips, etc as in Flash. Flex uses MXML for defining the UI and actionscript for programming.
Using Flex we can build AIR(desktop) applications as well as Flash (web/RIA) applications.

Flex Builder is a commercial IDE for developing flex applications.
Later during the launch of its Flex v4.0, Adobe rechristened Flex Builder as Flash Builder.

Flash Builder 4 Standard is available for free (if you are a student or unemployed developer or faculty/staff of eligible educational institutions) from adobe website.

But we got Flash Builder 4 as free for the purchase of Adobe Master Collection Creative Suite 5. It is simple and easy to use. I’ve tried a simple calculator application (flash) in FB4.

The process of how i build a simple calculator using Flash Builder is explained below,

First Run the Flash Builder 4 software
In that click File > New Flex Project

A 'New Flex Project' Dialog box’ll pop up
In that mention the Project name as xCalc
Leaving other settings to default
Application type - Web
Flex SDK version - Use default SDK (currently "Flex 4.0")
Server technology - None/Other
and then click finish.

The xCalc.mxml file will be opened in the Source view.
Click the Design tab button to toggle to the Design view.
From the components window drag and drop a BorderContainer control into the Design Area.
Place a TextInput control inside that and add Button controls for numbers 0-9, operators +,-,*,/,=. Name the objects as per your wish and set the relevant Labels for them in the properties window.

Right click the button labeled ‘0’ and select 'Generate Click Handler', this will take u to the auto generated event handler function in the code view. Change the method name as per your wish in the fx:Script block as well as in the Button object tag. Remaining things in the code listed below are self explanatory.


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" height="198" width="225">
<fx:Script>
<![CDATA[
import mx.core.*;
var str:String;
var operator:String;
var i:int=0;
protected function btn_0(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"0";
}
protected function btn_1(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"1";
}
protected function btn_2(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"2";
}
protected function btn_3(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"3";
}
protected function btn_4(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"4";
}
protected function btn_5(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"5";
}
protected function btn_6(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"6";
}
protected function btn_7(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"7";
}
protected function btn_8(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"8";
}
protected function btn_9(event:MouseEvent):void{
txtBx1.text=txtBx1.text+"9";
}
protected function btn_add(event:MouseEvent):void{
operator="add";
str=txtBx1.text;
txtBx1.text="";
}
protected function btn_sub(event:MouseEvent):void{
operator="sub";
str=txtBx1.text;
txtBx1.text="";
}
protected function btn_mul(event:MouseEvent):void{
operator="mul";
str=txtBx1.text;
txtBx1.text="";
}
protected function btn_div(event:MouseEvent):void{
operator="div";
str=txtBx1.text;
txtBx1.text="";
}
protected function btn_eq(event:MouseEvent):void{
i=parseInt(str);
switch(operator)
{
case "add":
{
i+=parseInt(txtBx1.text);
break;
}
case "sub":
{
i-=parseInt(txtBx1.text);
break;
}
case "mul":
{
i*=parseInt(txtBx1.text);
break;
}
case "div":
{
if(parseInt(txtBx1.text)!=0)
i/=parseInt(txtBx1.text);
else
i=0;
break;
}
}
txtBx1.text=i.toString();
str="";
operator="";
i=0;
}
protected function btn_clr(event:MouseEvent):void{
txtBx1.text="";
str="";
operator="";
i=0;
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:BorderContainer x="6" y="6" width="213" height="136">
<s:TextInput x="4" y="3" width="202" height="23" id="txtBx1"/>
<s:Button x="110" y="31" label="=" id="btn10" click="{btn_eq(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="57" y="31" label="CE" id="btn15" click="{btn_clr(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="161" y="31" label="+" id="btn11" click="{btn_add(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="161" y="56" label="-" id="btn12" click="{btn_sub(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="161" y="82" label="*" id="btn13" click="{btn_mul(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="161" y="109" label="/" id="btn14" click="{btn_div(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="4" y="31" label="0" id="btn0" click="{btn_0(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="4" y="56" label="1" id="btn1" click="{btn_1(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="56" y="56" label="2" id="btn2" click="{btn_2(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="110" y="56" label="3" id="btn3" click="{btn_3(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="4" y="82" label="4" id="btn4" click="{btn_4(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="56" y="82" label="5" id="btn5" click="{btn_5(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="110" y="82" label="6" id="btn6" click="{btn_6(event)}" fontSize="12" width="45" height="20"/>
<s:Button x="4" label="7" id="btn7" click="{btn_7(event)}" fontSize="12" width="45" height="20" top="109"/>
<s:Button x="56" label="8" id="btn8" click="{btn_8(event)}" fontSize="12" width="45" height="20" top="109"/>
<s:Button x="110" label="9" id="btn9" click="{btn_9(event)}" fontSize="12" width="45" height="20" top="109"/>
</s:BorderContainer>
</s:Application>


Once the coding is finished, we can test the application by running the project.

We can run the project by Clicking Run > Run xCalc or by pressing Ctrl+F11.
It’ll pop up a browser window to display the application(swf file) which is embedded into the html page.