• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Show/Hide columns in NSTableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show/Hide columns in NSTableView?


  • Subject: Re: Show/Hide columns in NSTableView?
  • From: Corbin Dunn <email@hidden>
  • Date: Fri, 28 Jul 2006 18:01:38 -0700


On Jul 28, 2006, at 4:39 PM, Andreas Mayer wrote:


Am 28.07.2006 um 17:43 Uhr schrieb Corbin Dunn:

What private methods are you overriding?

- (void)_readPersistentTableColumns; - (void)_writePersistentTableColumns;

In case you have any idea how I could avoid this, I'd be happy to change my code. :)

Well, the best thing to do is to log a bug when you are forced to override private API like this; that way, we can try to provide a public way of doing the same functionality. Unfortunately, I don't have any suggestions to avoid this, based on what you want to do (and I figured these were the ones you were talking about)



And beware that your app may break if you override private methods.

I know.
But in this case, the worst thing that could happen is, that the column configuration is not saved any more.


What if AppKit adds a "hidden/setHidden" property on NSTableColumn? I can cause compatibility problems, since the framework may start accidentally calling your method.

Well, I guess that would hide the column - which is all the point, no? :)

Well.....yes, but there could be problems. 10.3 introduced isHidden/ setHidden on NSView which started to cause some issues in existing apps that had a "setHidden".



Seriously though. If that functionality was added to NSTableView/ NSTableColumn, I'd just have to update my code. That's not really a problem for me. But I realize it could be a problem, if there were many projects that used this code - this is one reason I hadn't made it public yet.


Hm. I might look into a way to disable my implementation if the superclass already responds to that selector.

If you don't mind re-releasing your app on updated versions of the OS, then it isn't that big of a deal. However, users who upgrade before you do may not be happy. ;)



Err... so, let's assume Apple added the functionality to NSTableView to show/hide certain columns ... do you think -hidden and - setHidden: would be added to NSTableColumn? :} If I knew that, I could adjust my code to account for that possibility.



Well, take a look at NSView's isHidden/setHidden. That is the general pattern we use for hiding stuff.


thanks!
-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>)
 >Re: Show/Hide columns in NSTableView? (From: Corbin Dunn <email@hidden>)
 >Re: Show/Hide columns in NSTableView? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Cocoa bug? Arrow keys stop working in table view
  • Next by Date: Re: Cocoa bug? Arrow keys stop working in table view
  • Previous by thread: Re: Show/Hide columns in NSTableView?
  • Next by thread: Re: Show/Hide columns in NSTableView?
  • Index(es):
    • Date
    • Thread