Re: Callbacks, GUI updates and threading
Re: Callbacks, GUI updates and threading
- Subject: Re: Callbacks, GUI updates and threading
- From: Hamish Allan <email@hidden>
- Date: Mon, 10 May 2004 20:22:07 +0100
Well you can usually load all the data into some kind of lump very
quickly, and then do the slow processing in -makeWindowControllers,
right after allocating the window and displaying it. It's not
intuitive but it works fine. You can happily put up a sheet if you
want to.
For the record: makeWindowControllers is also called before the window
is displayed. I eventually found a working method which appeared on
this list a couple of years back (I did look before I asked, honest!)
courtesy of Simon Stapleton:
http://cocoa.mamasam.com/COCOADEV/2002/10/1/46630.php
----
- (void) windowDidLoad {
// other windowDidLoad code here
[self performSelector:@selector(showSheet:) withObject:nil
afterDelay:0];
}
- (void) showSheet: (id) something {
// Code to show the sheet here
}
This will cause -showSheet: to be called as soon as the app drops into
its runloop, by which point the window should be visible.
----
Cheers,
Hamish
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.