Re: Getting bound UI elements to update during a loop
Re: Getting bound UI elements to update during a loop
- Subject: Re: Getting bound UI elements to update during a loop
- From: James Dessart <email@hidden>
- Date: Thu, 14 Apr 2005 11:18:21 -0400
On 4/14/05, Rick Hoge <email@hidden> wrote:
> I have set up instance variables I want to display, added set and get
> methods, and call the 'set' method inside the fitting loop. However
> the NSTextField does not update until the end of the fitting procedure
> (i.e. the end of the runloop). It seems like the bindings are updated
> once per runloop - does anyone know how I could force more frequent
> updates to bound UI elements?
You'd have to find the notification center for key-value updates, and
somehow get it to act on notifications at times like that. I don't
know if that's possible. In any case, this is why displayIfNeeded
isn't updating the text field. As far as it's concerned, there is
nothing that needs displaying.
You could split the fitting procedure into smaller, more discrete
steps, if possible, and then return to the run loop more often. This
adds a bit of overhead, but will allow you to do some more
fine-grained scheduling of your loop.
James
_______________________________________________
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