Monday 9 July, 2007

Mac OS X Tips : Forcing Finder Database update

Suppose that you have made changes to your Info.plist file of the bundled application and want the change effects to take place on next launch, there are two forms of resolutions..

1. Change the modification date of the application’s package with touch before opening it.
2. Force the database to update for that item only. [lsregister -f MyGreatApp.app]

Mac OS X Tips : Trouble shooting - Launch Services

The Finder, and the command line based 'open' command, both use Launch Services to associate documents with applications. The Finder also uses this information to associate icons with documents.

The 'lsregister' command can be launched from the command-line, and gives scope for manual maintenance of the Launch Services database.

Problems involving incorrect icons or documents failing to open (with the proper application) can be solved using 'lsregister'

$ /System/Library/Frameworks/
ApplicationServices.framework/Versions/A/
Frameworks/LaunchServices.framework/Versions/
Current/Support/lsregister

(all on one line)

lsregister: [OPTIONS] [-domain { system | local | user | network }]... [path]...

Search the paths for application bundles and add each found item to the Launch Services database. For domain specifications, ask CF for the list of application locations in the given domain(s).

-kill Reset the global Launch Services database before doing anything else
-lint Print information about plist errors while registering bundles
-convert Register apps found in older LS database files
-load Load the LaunchServices service plugin if it's not already loaded.
-lazy n Sleep for n seconds before registering apps if the local cache is aleady populated.
-r Recursively register directory contents, do not recurse into packages or invisible directories.
-R Recursively register directory contents, including the contents of packages and invisible directories.
-f force-update registration info even if mod date is unchanged
-v Display progress information.
-dump Display full database contents after registration.
-h Display this help.

Issuing the command:

...the/long/path/lsregister -kill -r -domain system -domain local -domain user

will repair the Launch Services database.

[From: www.osxfaq.com]

Tuesday 3 April, 2007

Tuesday 20 March, 2007

My new Cam


Hey, Its my new camera.. Now I will come n catch you to store in my digital memory ;-).

Monday 12 March, 2007

Kiddy Teaser

I am a 7 letter city. My 234 letter is a bird. 61 is cool. 1274 is a part of the face. 4713 is way of saying good. 4 equal to 5.
Who am I?

[From: SMS from beloved ones :-)]

At ISRO Layout lake


I had been to ISRO layout on a fine evening (5th March) with my roommates. To identify each, from the left, Krishna Moorthy, Sathyashankar, myself, Avinash, and hey, Ganesh Prasad are you meditating there ;-). Its on the shores of a lake there.


On the east end of this lake it is a Shri Padmavathi and Shrinivasa Swaami temple.

Friday 9 March, 2007

On Pulsar 180



It was a bright sunny day at MGM grounds Udupi on 5th Feb, setup for a cricket match for Robosoft pals. And the courtesy of the brand new Pulsar 180 is by my friend Naveen.

Wednesday 7 March, 2007

Debugging techniques

A good link for developers of Mac OS X...

Mac OS X Debugging Magic

Beauty of dynamic_cast in C++

Recently I came across this strange behavior of dynamic_cast in my R&D work..

What do you think this program will print out?

#include

class Base
{
public:
virtual ~Base() {}

void AddRef()
{
std::cout<< "Resolved dynamic cast\n";
}
};

class CompositeBase : public Base
{
public:
virtual ~CompositeBase() {}
};

class Dependent
{
public:
virtual ~Dependent() {}
};

class CompositeDependent : protected Dependent
{
public:
virtual ~CompositeDependent() {}
};

class RealObj : public CompositeBase, public CompositeDependent
{
public:
virtual ~RealObj() {}
};

int main (int argc, char * const argv[]) {

Dependent* pDep = (Dependent*)( new RealObj() );

Base* pBase = NULL;

try
{
pBase = dynamic_cast (pDep);
}
catch(...)
{
printf("Exception \n");
}

if(pBase)
pBase->AddRef();

delete pDep;

return 0;
}

Where I am..

Hi there,

I was working in Udupi after the completion of my BE courses in 2003 June. Now I came to Bangalore on Feb 2007 and have started my new career life.

Now I do work on range of OS platforms like Macintosh, Macintel, and Windows.

:-)