|May 16, 2012, 10:20 AM||#1|
NSOutlineView problem with Lion
I'm an experienced developer (on other platforms) who's just starting to take over some Mac development duties at my small company.
I've inheirited an enormous (and unfortunately bug-ridden) code base for our company's in-house relational database frontend. Unfortunately, right when I took over the project, we started a Lion rollout, and I've discovered a vexing issue that only shows up on Lion systems.
I have attached four screenshots, before and afters of opening and closing up parent items (hope I have my terminology right) in an NSOutlineView. This is the same application, running on my Snow Leopard machine and our head of purchasing's brand new Lion system.
As you can see, on the Lion system, something goes wrong when the parent items are opened and the child line is not correctly displayed. Oddly, our application is full of OutlineViews, and this is the only one exhibiting this behavior, and only on Lion systems. The only difference I could find is that when I check out those OutlineViews in InterfaceBuilder, the problem one is a "Row Resizable Outline View." Is that a standard UI component, or did one of our previous in-house devs create that?
I appreciate your time and attention to this message -- I know I probably haven't given enough information for anyone to figure out what's going on, but pointers in the right direction or requests for additional information would be most welcome.
Thanks very much in advance!
PS - It would appear my attachments disappeared after posting. Hopefully these links will be allowed through:
Last edited by SpartanTom; May 16, 2012 at 10:24 AM. Reason: Attachments disappeared!
|May 16, 2012, 04:11 PM||#2|
Just of the sake of google and archive searched, just wanted to note that the RowResizableOutlineView is not a standard Apple UI component -- see http://www.evanjones.ca/software/osx-tableview.html. I have switched back to the standard NSOutlineView for that area of our Database in the short term. It's a very low priority on my list of bugfixes, but if I ever get the RowResizables working on Lion again, I'll follow up here.
|May 17, 2012, 11:31 PM||#3|
It actually is a standard feature of NSTableView (of which NSOutlineView is a subclass) since about 10.5. To do it yourself, you have to have a NSTableView delegate for the outline view, in which you implement -tableView:heightOfRow:. How Evan Jones shoehorned it into the datasource I have not investigated, but that could be the reason for the Lion bug.
Remember that this method will get called frequently, so it should have a very quick way to determine how tall to make the row, perhaps a value cached in the datasource array, to which it should have direct access (datasource and delegate are often the same object).
On a side note, it is unfortunate the Evan Jones used the word "resizable" in his object, because that leads to confusion: "resizable" usually implies the the user has some control over sizing, the more appropriate term would have been "variable height" or something like that.
You got to be a spirit. You can't be no ghost.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Bind NSOutlineView & NSTextView to NSTreeController?||ArtOfWarfare||Mac Programming||3||Dec 9, 2012 11:25 AM|
|Allow NSOutlineView to be rearranged?||ArtOfWarfare||Mac Programming||2||Dec 5, 2012 10:48 PM|
|Issue with NSOutlineView?||jaquadro||Mac Programming||0||Nov 4, 2012 04:12 PM|
|NSOutlineView Source List Child Item Titles Disappearing||mkmDesign||Mac Programming||1||Oct 26, 2012 12:46 PM|
|NSOutlineView objects being released||perrien||Mac Programming||3||Aug 28, 2012 06:47 AM|
All times are GMT -5. The time now is 08:18 PM.