Frustrating...
Frustrating...
- Subject: Frustrating...
- From: Jeff LaMarche <email@hidden>
- Date: Mon, 13 Jan 2003 20:49:53 -0500
I've hit a bit of a frustrating problem. I've got a document-based app
I'm working on. I've implemented loadDataRepresentation: ofType: to
handle opening files. I have a method called updateUI that I use to
populate text fields from the document's data, which I call after
unarchiving the data:
- (BOOL)loadDataRepresentation:(NSData *)uData ofType:(NSString *)aType
{
[self set
Data:[NSUnarchiver unarchiveObjectWith
Data:uData]];
[self updateUI];
return data != nil;
}
Here's the first part of updateUI (with some calls to NSLog) to
illustrate the problem I'm having:
- (void)updateUI
{
NSLog(@"Updating User Interface");
NSLog(@"Value for Line1: %@", [[data clientAddress] line1]);
[billingAddress1TF setStringValue:[[data clientAddress] line1]];
NSLog(@"Line 1 Set to: %@", [billingAddress1TF stringValue]);
...
The data is unarchiving correctly. [[data clientAddress] line1] is
printing to the console with the correct value. However, after calling
setStringValue: on billingAddress1TF, the field still shows a null
value and the field is blank in the user interface...
Anyone have any thoughts on what might be going on? The field is
enabled and visible. Am I trying to set the fields to early, perhaps -
do I need to wait for the nib to be fully unarchived? If so, what
method should I use to update the UI? As a test, I tried calling my
updateUI method from a user-triggered action, and the fields populate
correctly at that point, so I'm guessing I'm just doing the update at
the wrong time.
Any help is, as always, appreciated..
_______________________________________________
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.