• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Spotlight while running windows modal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight while running windows modal


  • Subject: Re: Spotlight while running windows modal
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 18 Feb 2010 09:55:46 +0000

On 18 Feb 2010, at 05:30, Kiel Gillard wrote:

> Hi all,
>
> I'm trying to cancel a modal NSAlert when Spotlight determines a file exists in the file system. I create and start the NSMetadataQuery before I run the alert modal. However I do not receive notifications of changes to my metadata query while my application is running modal.
>
> The docs indicate NSMetadataQuery and MDQuery operate on particular modes of an application's run loop however I am required to run the NSAlert modal.
>
> I used an NSAlert with a modal session but that produced strange results. These results did not include the observer receiving the appropriate notifications for changes to my metadata query.
>
> Is there some way I can have the best of both worlds?
>
You could try using a modal sheet, if it fits your modal requirements:

	// show the save sheet
	[NSApp beginSheet:[self window] modalForWindow:_modalForWindow
		modalDelegate:self
	   didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
		  contextInfo:NULL];

I use such a configuration and my app continues to receive events from my run loop attached network sources.

Regards

Jonathan Mitchell

Developer
http://www.mugginsoft.com

> Thanks in advance,
>
> Kiel
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Spotlight while running windows modal (From: Kiel Gillard <email@hidden>)

  • Prev by Date: cocoa API to get List of hard disk Partitions
  • Next by Date: Re: cocoa API to get List of hard disk Partitions
  • Previous by thread: Re: Spotlight while running windows modal
  • Next by thread: Re : Proper way to initialize application support file
  • Index(es):
    • Date
    • Thread