Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableColumn 'enabled' binding not in 10.3? Any others?




On 2007 May, 30, at 9:52, Sam Stigler wrote:

I just was looking through the list archives from early 2005 (Tiger was released in April 2005) to see if I could find anything on this issue, and I found several hits. However, bad news: mmalc posted February 11, 2005 that this is a known bug on Panther (http:// lists.apple.com/archives/cocoa-dev/2005/Feb/msg00686.html).

Ah, thank you very much. I've tried many times but never found that message.


Indeed it must be a bug and, as Shawn noted, one which was discovered too late in the life cycle of Panther for Apple to want to fix, so I'm stuck with it. I subclassed NSTableColumn and sent it an - exposedBindings message during -awakeFromNib. Result:

	In Tiger, I get 14 bindings.
	In Panther, I get 12 bindings.  'enabled' and 'enabled2' are missing.

Epilog. Since I have so many columns now using "pure bindings", it seemed that manually binding would be a nightmare, so I tried for a long time to ^create^ the missing binding by subclassing NSTableColumn, using -exposeBinding in +initialize, over-riding - exposedBindings, etc., but nothing worked. I finally settled for subclassing NSTableColumn and implementing the following code which leaves all my columns always enabled in Panther, but at least doesn't raise any exceptions, so it works. And so I don't have to fork my release and say "use this old version for Panther", which was another unsightly alternative under consideration.

Regarding the NSArray category below, for some stupid reason, sometimes that binding causes an NSArray to get a -boolValue message. Crazy. Anyhow, if you implement the method, it prevents the "no such selector" exception.

Thanks for all the help,

Jerry

@interface NSArray (PantherNSTableColumnBugFix)

- (BOOL)boolValue ;

@end

@implementation NSArray (PantherNSTableColumnBugFixc)

- (BOOL)boolValue {
	return YES ;
}

@end


@interface PantherBugWorkaroundTableColumn : NSTableColumn @end

@implementation PantherBugWorkaroundTableColumn

- (void)setEnabled:(id)enabled {
}

- (id)enabled {
	return [NSNumber numberWithBool:YES] ;
}

@end


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSTableColumn 'enabled' binding not in 10.3? Any others? (From: Jerry Krinock <email@hidden>)
 >Re: NSTableColumn 'enabled' binding not in 10.3? Any others? (From: mmalc Crawford <email@hidden>)
 >Re: NSTableColumn 'enabled' binding not in 10.3? Any others? (From: Jerry Krinock <email@hidden>)
 >Re: NSTableColumn 'enabled' binding not in 10.3? Any others? (From: Jerry Krinock <email@hidden>)
 >Re: NSTableColumn 'enabled' binding not in 10.3? Any others? (From: Sam Stigler <email@hidden>)
 >Re: NSTableColumn 'enabled' binding not in 10.3? Any others? (From: Jerry Krinock <email@hidden>)
 >Re: NSTableColumn 'enabled' binding not in 10.3? Any others? (From: Sam Stigler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.