Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Mac OS X Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-12-2011, 10:37 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2008
Posts: 169
Danneman is on a distinguished road
Default MacOS-equivalent of "tableview:didSelectRowAtIndex"

I've just started MacOS-programming from having done some iOS-programming, and am finding a lot of things that differ, especially on how to set up a tableview.

I've managed to set up a simple tableview and populate it via a plist using this tutorial: http://andrehoffmann.wordpress.com/2...esxcode-3-1-3/

However, I'm at a loss to how to register pressing a row/cell. In iOS I used the "didSelectRowAtIndex", but that's apparently not how to do it in MacOS.

So my question is: what's the equivalent of that function in macos? Or rather, is there perhaps a conversion-tutorial/docs anywhere? I've looked, but found nothing...
Danneman is offline   Reply With Quote
Old 01-14-2011, 12:07 AM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Quote:
Originally Posted by Danneman View Post
I've just started MacOS-programming from having done some iOS-programming, and am finding a lot of things that differ, especially on how to set up a tableview.

I've managed to set up a simple tableview and populate it via a plist using this tutorial: http://andrehoffmann.wordpress.com/2...esxcode-3-1-3/

However, I'm at a loss to how to register pressing a row/cell. In iOS I used the "didSelectRowAtIndex", but that's apparently not how to do it in MacOS.

So my question is: what's the equivalent of that function in macos? Or rather, is there perhaps a conversion-tutorial/docs anywhere? I've looked, but found nothing...
It will post a NSNotification
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 01-25-2011, 11:14 AM   #3 (permalink)
mox
Registered Member
 
mox's Avatar
 
Join Date: May 2009
Posts: 33
mox is on a distinguished road
Default

Try that ;-)

Code:
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification {
  NSLog(@"row selected is: %i", [[aNotification object] selectedRow]);
}
mox is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting 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



» Advertisements
» Online Users: 371
7 members and 364 guests
husthlj, illogical, LegionMD, LunarMoon, mer10, Murphy, padsoftware
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0