Well, about uiview update and nsthread: I want to do an example to show better the BIG problem:
I start a thread with
[NSThread detachNewThreadSelectorselector(mainloop toTarget:self withObject:nil];
This "mainloop" method is like
-(void)mainloopid)object{
while(YES){
NSString *line = [stream readLine];
//console is UITextView object
console.text = line;
}
}
Well, when I start the thread the application continues to work. When i receive the first line (and then when the thread modify for the first time a object of the GUI) the USER interaction is BLOCKED. All the GUI (bottons, tables, not only "console textview") is refreshed ONLY every while loop and (when i receive another line) and then if I want to see the update i have to wait the next line........
Why ?
I'm getting crazy with this problem.
Thanks.
Alvise
I start a thread with
[NSThread detachNewThreadSelectorselector(mainloop toTarget:self withObject:nil];
This "mainloop" method is like
-(void)mainloopid)object{
while(YES){
NSString *line = [stream readLine];
//console is UITextView object
console.text = line;
}
}
Well, when I start the thread the application continues to work. When i receive the first line (and then when the thread modify for the first time a object of the GUI) the USER interaction is BLOCKED. All the GUI (bottons, tables, not only "console textview") is refreshed ONLY every while loop and (when i receive another line) and then if I want to see the update i have to wait the next line........
Why ?
I'm getting crazy with this problem.
Thanks.
Alvise