Pages

Sunday, 16 January 2011

Add Chromium to Launcher in Ubuntu

After installing chromium, you might not see "Add to Launcher" for the chromium browser in the Ubuntu Unity interface. For that to appear what you need to do is just reboot. Now run chromium, right-click the icon and you'll see "Add to Launcher" option.

Friday, 14 January 2011

Install Appcelerator Titanium in Ubuntu

Appcelerator Titanium is handy if you like to develop desktop as well as mobile (and web applications) entirely using JavaScript or other scripting languages like Python or Ruby. It supports html5 and css3. Its an alternative solution to the proprietary Adobe AIR and Adobe Flash. Yes, flash is still proprietary and the eclipse pig IDE, the Flash Builder (without which it would be an overkill to use the Flex sdk) costs like crazy.
Back to installing titanium v1.2.2 on Ubuntu 10.10 Maverick Meerkat.
1. Download the linux package from the appcelerator download page.
Mine is 32 bit OS. Note that if you have less than 4 GB of RAM, don't even bother installing a 64 bit OS, because its useless in every sense.
2. Extract it and navigate into the folder.
3. Run Titanium Developer.
You can do it by using
./Titanium\ Developer
4. Install to say your home directory.
It will download two packages and it closes.
5. Run it again (step 3).
It will throw the error:
./Titanium Developer: symbol lookup error: /usr/lib/libgtk-x11-2.0.so.0: undefined symbol: g_malloc_n
6. cd to ~/.titanium/runtime/linux/1.0.0
7. Delete the following files as shown below:
rm libgobject-2.0.*
rm libglib-2.0.*
rm libgio-2.0.*
rm libgthread-2.0.*
Note the * at the end of the filename. There are files ending with .la*, .so@, .so.0@ etc. Its to delete all of them.
8. Also the python linked by appcelerator is version 2.5 where as in Ubuntu 10.10 it has version 2.6. So fix it.
sudo ln -s /usr/lib/libpython2.6.so.1.0 /usr/lib/libpython2.5.so.1.0

Tuesday, 4 January 2011

Spell Check in Flex Using Squiggly SDK

Squiggly SDK can be used to add spell check for your Flex components.
1. Download Squiggly SDK from Adobe Labs.
2. Create a new Flex Project.
3. Copy the libs in the SDK to the libs in the Project folder.
4. Copy the contents in the src folder of the SDK to the src folder in your Project.
5. Import the Class
import com.adobe.linguistics.spelling.SpellUI;
6. Create a text area component
<s:TextArea id="txt" initialize="txt_initializeHandler(event)"/>
7. In the initialize handler add spell check
private function txt_initializeHandler(event:FlexEvent):void {
    SpellUI.enableSpelling(txt, "en_US");  //spell check for en_US
}
8. Done.

Download the flex project example (fxp).