Re: Handling open as a result of spotlight search
Re: Handling open as a result of spotlight search
- Subject: Re: Handling open as a result of spotlight search
- From: The Karl Adam <email@hidden>
- Date: Thu, 5 May 2005 19:00:09 -0400
Thanks for all the help everyone, here is the code that I used to get
at the search text;
NSAppleEventManager *sam = [NSAppleEventManager sharedAppleEventManager];
NSAppleEventDescriptor *lastEvent = [sam currentAppleEvent];
NSString *searchString = [[lastEvent
descriptorForKeyword:keyAESearchText] stringValue];
Then you can use whatever method your application uses for searching
in order to highlight the search text.
-Karl
On 5/5/05, The Karl Adam <email@hidden> wrote:
> Thanks for the prompt response, but it seems that inorder to support
> this I need to handle the kAEOpenEvent instead of letting
> application:openFile: take care of it, unless I'm mistaken in how the
> AppleEvents work in Cocoa applications.
>
> Is there some way to just ask for the "current" or last apple event at
> a given time?
>
> -Karl
>
> On 5/5/05, Shawn Erickson <email@hidden> wrote:
> >
> > On May 5, 2005, at 3:16 PM, Shawn Erickson wrote:
> >
> > > "spotlight application launch"
> >
> > Make that "spotlight launch event"...
> >
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden