Entries from July 2007 ↓
July 20th, 2007 — Apple

I always wanted a faster and better search for Thunderbird. If I could find content within emails with Spotlight, it would save a lot of trouble. Even more important if I could search in OpenOffice.org documents using Spotlight, it would really be a boon.
Browsing around some blogs, I found Dennis’s blog. The blog post describes in detail how we can enable Spotlight search for Thunderbird. You can read the post for full details, but the following are the steps:
- You must have Thunderbird 2+.
- Enable spotlight search in Thunderbird: Preferences - Advanced - Config Editor - mail.spotlight.enable to true
- This will convert all mails from default mbox format to individual files.
- Make sure .eml files are set to open with Thunderbird. You can do that by going to the info of one .eml file, and changing “Open With” application for all.


Next on, OpenOffice documents in Spotlight!
I searched a lot for this on the Apple site, but could not find much. A bit of digging deeper, I figured that the NeoOffice has a plugin for Spotlight - NeoLight - that can allow Spotlight to search OpenOffice.org documents. NeoOffice is actually a native Mac port of OpenOffice. I downloaded the plugin, extracted the mdi importer and placed it in the Spotlight Library.
Invoked a search and voila! All my OpenOffice documents showed up!
I am a happy with my desktop search!
July 16th, 2007 — Flex & Flash, Technology
Have had some troubles getting data to Flex from PHP using WebORB. Finally got it to work using some workarounds!
The discussion thread is here on the Midnight Coders forums.
We wanted to have classes doing most of our business logic and call them from both PHP as well as WebORB. Flex will make service calls to WebORB to get data in AMF format. The latest version of WebORB has an excellent Service Browser that allows to inspect and invoke services right from a browser console. Since we were including a prepend file in the main class, the Service Browser failed using the file. Had to include the prepend file from the class’s constructor to make it work!
This is because WebORB itself will instantiate an object of the class to invoke a method on it. It can access the $_SESSION variables across all the objects that get instantiated in turn (and not $GLOBALS).
Here’s some PHP code to illustrate:
<?php
class Manager
{
public function __construct()
{
/** IMPORTANT ******
If we do not include the prepend file here, the WebORB Service Browser
tries to load it, and that will create a problem because of PHP reflection
Putting it in the constructor will include the file and make things work.
Also, you can not use $GLOBALS to store variables across functions.
Storing them in $_SESSION will work though.
**/
// The directory this file will get called from is “Consolde” in webroot.
// So include path must be relative to that
$prepend = “../myproject/includes/prepend.inc.php”;
if (is_file($prepend)) // sanity check
{
include_once($prepend);
}
}
/**
* Get a list of all favorite products
**/
public function getFavorites()
{
$query = ‘SELECT id, name FROM product_favorites
WHERE userId = ‘.intval($_SESSION['userId']).’
ORDER by lastModified DESC’;
$_SESSION['mainDB']->Query($query);
$result = $_SESSION['mainDB']->Result();
return $result;
}
}
?>
And an excerpt of my prepend.inc.php:
$config["dbhost"] = “localhost”;
$config["dbuser"] = “user”;
$config["dbpass"] = “pass”;
$config["dbname"] = “maindb”;
$_SESSION["config"] = $config;
// Include all classes for the application
include_once(”classes/DB.php”);
// Do the DB connection and store it into session
// The DB class will use the $_SESSION["config"] values
// to connect to the DB
$_SESSION["mainDB"] = new DB();
This made it work both from the Service Browser and Flex. It actually also makes it work from the rest of the PHP files I have. Allowing me to test the whole app easily.
This is looking good now!
Thanks!
July 9th, 2007 — Apple, GNU/Linux, Recommended Reading, Technology

I have become a great fan of QuickSilver after I finally set it up a couple of months back. I am always doing a Command + Space to bring up QuickSilver now, even when I am not on a Mac!
For people who are on Windows, Skylight could be a good alternative. Lifehacker has an article on it, and they found it pretty impressive. Though they won’t ditch Launchy yet.
And for the Linuxers, there is Katapault.
If you are not using any of these yet, I strongly recommend you get one!
July 7th, 2007 — Apple, Mobile
The guys at iPhone Dev Wiki have found a way to get serial access to the iPhone bootloader - without opening the case.
Something else from their latest progress report:
We know how to unlock the phone. Unfortunately the commands needed gave “Permission Denied” errors. We did find a reference to a hardware register that causes “Permission Denied” error in the bootloader, but we cannot software patch the bootloader because it is signed.
If all of that does not make much sense to you, don’t worry. Wait for a couple of months. We may just as well be able to install a Linux version on the iPhone! They have done it for iPod, so why not iPhone?
I am going to wait for a couple of months!
But something else on the official iPhone site is more interesting. Apple’s has released a guide to designing web applications for iPhone. There is not much new in it, but it covers the fundamentals well. If you plan to develop applications for the iPhone, you should go take a quick look. The most important things are the screen size and the interaction via fingers! Odd enough, iPhone does not consider itself to be a handheld device! It will NOT take the media = handheld style sheet. It will use the screen one.
Good times are ahead. Mobile phones with VGA resolution (640×480) are coming out, so the troubles with mobile screen sizes when you develop a mobile web app should reduce after a while.
July 6th, 2007 — Meanings & Explorations
Was listening to Buddha Bar yesterday (I am a big fan of the series) and some words caught me from the song Karma.
What is right? And What is wrong?
In the ocean of choice?
That’s what I heard, but I think it’s actually “ocean of joy” and not “ocean of choice”.
I will leave you thinking…