Bindings delay issues
Bindings delay issues
- Subject: Bindings delay issues
- From: Bryan Hansen <email@hidden>
- Date: Tue, 10 Apr 2007 15:15:09 -0700
I am working on project that uses an NSTableColumn to mark valid/
invalid entries in a NSScrollView by displaying a tif image in the
column as a warning. I'm using bindings to call a method that gets
the appropriate path to the image to set in the column (nil if the
entry is valid). I also have a BOOL value and setter method which is
manipulated after checking validity. The BOOL value is used in the
getPath method to determine what will be returned.
My problem is that there is a delay in the bindings method invocation
to retrieve the path. If a row is invalid and becomes marked as such,
but then becomes valid the image is not cleared at the right time. A
delay occurs where the warning tif is cleared after the next
interaction with the interface, even UI elements not associated with
the binding or ScrollView. I'm not sure if there is something that
I'm doing to delay the bindings or something I could do to force an
update at the right time.
Heres the pertinent code:
- (BOOL)successfulEntry { return successfulEntry; }
- (void)setSuccessfulEntry:(BOOL)yn
{
[[ABCLogger defaultLogger] logDebug:@"setSuccessfulEntry: %d", yn];
successfulEntry = yn;
}
- (NSString *)entryStatusImagePath
{
[[ABCLogger defaultLogger] logDebug:@"entryStatusImagePath: %d",
successfulEntry];
// if successful entry we're not going to set an image
if (successfulEntry)
{
return nil;
//NSBundle *thisBundle = [NSBundle bundleForClass:
[ApplicationController class]];
//[[ABCLogger defaultLogger] logDebug:@"return
successfulEntry tif: %@",[thisBundle
pathForResource:@"successfulEntry" ofType:@"tif"]];
//return [thisBundle pathForResource:@"successfulEntry"
ofType:@"tif"];
}
// for a failed entry we're doing to return a red bullet for
display
NSBundle *thisBundle = [NSBundle bundleForClass:
[ApplicationController class]];
[[ABCLogger defaultLogger] logDebug:@"return failedEntry tif: %
@",[thisBundle pathForResource:@"failedEntry" ofType:@"tif"]];
return [thisBundle pathForResource:@"failedEntry" ofType:@"tif"];
}
Any help would be great,
Bryan
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden