In Cocoa, why won't a textfield be shown until after the IBAction is completely executed?

Posted by Nano8Blazex on Stack Overflow See other posts from Stack Overflow or by Nano8Blazex
Published on 2010-05-04T00:58:32Z Indexed on 2010/05/04 1:08 UTC
Read the original article Hit count: 308

I have an IBAction with some simple code inside:

-(IBAction)change:(id)sender {
[textfield setHidden:NO];
[self dolengthyaction];

}

'textfield' is an NSTextField in a nib file, and -'dolengthyaction' is a function that takes about a minute to finish executing.

My question is: Why isn't the textfield shown until AFTER "dolengthyaction" is done executing? I want it to be revealed before the dolengthyaction starts taking place. Is this an inherent problem or is there something wrong with my code? (or in another part of my code?)

I'm still not very good at programming so I apologize if I worded something badly and formatted something wrong.

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c