Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / June 2005



Tip: Looking for answers? Try searching our database.

How to wait for Notification

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zamiran - 29 Jun 2005 17:14 GMT
Hi,

One more question. I'm performing a search function in PDF file. I
use didFind delegate to proccess results. The problem  is to make
program wait for the search to be completed.  The search method I'm
using is posting notification documentDidEndDocumentFind, but I have
no idea how to use it in this case. Any suggestions are appreciated.
Thanks a lot.

* posted via http://www.mymac.ws
* please report abuse to http://xinbox.com/mymac
Michael Ash - 29 Jun 2005 19:24 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> no idea how to use it in this case. Any suggestions are appreciated.
> Thanks a lot.

Just return control back to the event loop and let your app continue to
run normally. The notification will then be delivered at the appropriate
time.
zamiran - 29 Jun 2005 20:05 GMT
> Just return control back to the event loop and let your app continue
> to
> run normally. The notification will then be delivered at the
> appropriate
> time.

That's what I.m trying to do, but wierd it seems that the
notifications are late, while control is already at the loop's next
cicle.

* posted via http://www.mymac.ws
* please report abuse to http://xinbox.com/mymac
Tom Harrington - 29 Jun 2005 21:36 GMT
> > Just return control back to the event loop and let your app continue
> > to
[quoted text clipped - 5 lines]
> notifications are late, while control is already at the loop's next
> cicle.

You mean, on the next pass through the event loop?  That's normal.  
Notifications are delivered using the event loop, but there's no
guarantee of them arriving at any particular pass through the loop.

Signature

Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0:  Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/

Michael Ash - 29 Jun 2005 21:50 GMT
>> Just return control back to the event loop and let your app continue
>> to
[quoted text clipped - 5 lines]
> notifications are late, while control is already at the loop's next
> cicle.

That's the entire point of using a notification in this case. The search
won't complete instantly. By using a notification, your application can
continue to be responsive in the user until it finishes.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.