Re: Indicate loading while bindings read from Core Data
Re: Indicate loading while bindings read from Core Data
- Subject: Re: Indicate loading while bindings read from Core Data
- From: Brad Siegfreid <email@hidden>
- Date: Sun, 5 Nov 2006 13:17:33 -0600
Thanks, Matt, that'll give me some direction to go with this evening.
I'm still trying to get my head around the "magic" that occurs with
bindings and the other automatic events that happen when things are
built in IB. So far the hardest part of Cocoa and IB has been
learning about the parts that hidden behind the frameworks and
dealing with a true event model instead of HTTP requests and responses.
Taking a second look at your comment I wonder if its more geared
towards a non-document architect or if its just my ignorance on
loading a document window. Maybe I could determine if the window is a
new document or loading an existing document and then display some
sort of loading spinner, tying into the controller to determine when
loading is complete in order to remove the spinner? I don't see any
connections or bindings in IB on the array controller that would
allow me to hook up a delegate. Is there some way to get a reference
to a controller created in IB from my document object?
- Brad
On Nov 5, 2006, at 12:51 PM, Matt Neuburg wrote:
On Sun, 5 Nov 2006 09:52:54 -0600, Brad Siegfreid
<email@hidden> said:
This is my first time posting to the list. By day I'm a server-side
Java developer but started working with Cocoa a little while ago to
create an application that I eventually hope to release to the
public. I feel that I've started to connect with the Cocoa way of
doing things but I'm a little stumped by something.
I have a document that displays data from Core Data in a table using
bindings. The document has the potential to be quite large with small
sets starting at 10,000 records or more. My problem is that when
loading a document there is a noticeable but not unacceptable delay
from rendering the window to the rendering of data in the table. Its
enough of a delay that I feel I should provide some feedback. I
haven't found a good place to provide a loading message since the nib
seems fully loaded and now I have to wait for the bindings to do
their magic.
Here's what I do. Don't let your principal window show
automatically on
start. Put up a splash window of some sort to give the user
something to
look at. (I find it is best to do this in the +initialize routine,
because
otherwise there is a delay before the splash screen appears.) Now,
instead
of letting the NSArrayController in the nib do "automatically prepares
content", when the app has finished launching you can tell the
NSArrayController, yourself, in code, to fetchWithRequest:nil merge:NO
error:nil. When that call returns you are ready to rock and roll,
so take
down the splash window and put up your principal window. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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