NSTextField only displaying last setStringValue in a loop
NSTextField only displaying last setStringValue in a loop
- Subject: NSTextField only displaying last setStringValue in a loop
- From: Ken Tozier <email@hidden>
- Date: Fri, 26 Mar 2004 15:46:07 -0500
Is there some delay before NSTextFields display strings using
"setStringValue"?
I wrote a class that downloads photos from a camera and posts a
notification (on the same machine) containing the name of the most
recently downloaded photo. In the window controller, the method that
receives these notifications is receiving all the sent messages (as
verified by NSLog) but only the last received message actually displays
in the UI. Is there some "forced refresh" command I'm missing?
Here's the relevant snippet:
// Downloading object posts the following message from within a loop
[[NSNotificationCenter defaultCenter]
postNotificationName:@"DownloadingImage"
object:nil
userInfo: [NSDictionary dictionaryWithObject: sourceFileName
forKey:@"file name"]];
// receiving object handles the message like so:
[mImageName setStringValue:[[inNotification userInfo]
objectForKey:@"file name"]];
Thanks for any help...
Ken
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.