Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Selecting Sequences of Cells

Selecting Sequences of Cells
Thread Tools
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 13, 2003, 11:42 PM
 
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!

     
DaGuy  (op)
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 17, 2003, 12:42 AM
 
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
Reply With Quote
Jul 17, 2003, 03:52 AM
 
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
Reply With Quote
Jul 17, 2003, 11:16 PM
 
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.
Rick Roe
icons.cx | weblog
     
DaGuy  (op)
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
Jul 17, 2003, 11:43 PM
 
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.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:10 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2