 |
 |
Selecting Sequences of Cells
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
I need to be able to select a sequence of cells in an NSTableView. The sequence of cells can either be in one row or in one column.
In other words, I want to mimic the behavior of an Excel spreadsheet's selection functionality. For example, click-drag the mouse to select a sequence of cells either in a row or in a column. If all goes well I'll build an Excel killer
How does one do this with an NSTableView? I've been browsing through the documentation haven't bumped into anything that I think I can use.
Thanks in advance!

|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
So, no one has taken a shot at this one.
Any related feedback would be welcomed, I need some ideas and perspective. If I decide to use NSMatrix then it's not clear to me how to generate a spreadsheet of NSCells?

|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I'd say the basic lesson here is that NSTableView is really not designed for an Excel-type application. If you want to provide that sort of functionality, you're going to have to either do some pretty heavy subclassing of NSTableView or roll your own custom table class (which is actually not a bad idea if the table is at the center of your application, I'd think).
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
Chuckit's right: you're either going to have to hack NSTableView to pieces or write something new if you want the kind of functionality you're describing. The latter is far more advisable -- even though it seems at the outset that you might have to do less in order to customize NSTableView, you'll find yourself proven wrong as you try to make your extensions cover all the things that are private internal voodoo in Apple's implementation.
This is pretty much the same reason as why OmniOutliner doesn't use a customized NSOutlineView, and iPhoto's main view isn't a customized NSMatrix, et cetera.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
Thanks, I appreciate the feedback. Is this a glaring omission in the framework? Lots of new apps could emerge if Apple provided such extension to the API.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |