Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Show/Hide columns in NSTableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show/Hide columns in NSTableView?




It involves subclassing NSTableView *and* NSTableColumn and it uses two private methods of NSTableView - since I couldn't get autosaving to work properly without them.

What private methods are you overriding? I'm curious to know for compatibility reasons. And beware that your app may break if you override private methods.



@interface AMRemovableTableColumn : NSTableColumn { IBOutlet AMRemovableColumnsTableView *mainTableView; }


- (BOOL)hidden; - (void)setHidden:(BOOL)flag;


I would be vary careful when you introduce generic names like this in a subclass of an AppKit class, especially if it is likely that AppKit may introduce a method with the same name at a later date. What if AppKit adds a "hidden/setHidden" property on NSTableColumn? I can cause compatibility problems, since the framework may start accidentally calling your method. This is just something to be aware of.



-corbin _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Show/Hide columns in NSTableView? (From: Fredrik Olsson <email@hidden>)
 >Re: Show/Hide columns in NSTableView? (From: Andreas Mayer <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.