Skip navigation.
 
mlRe: Getting bound UI elements to update during a loop
FROM : James Dessart
DATE : Thu Apr 14 17:18:21 2005

On 4/14/05, Rick Hoge <<email_removed>> 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

Related mailsAuthorDate
mlGetting bound UI elements to update during a loop Rick Hoge Apr 14, 16:50
mlRe: Getting bound UI elements to update during a loop James Dessart Apr 14, 17:18