• 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: NSTreecontroller outline view selectedObjects is empty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTreecontroller outline view selectedObjects is empty


  • Subject: Re: NSTreecontroller outline view selectedObjects is empty
  • From: Elise van Looij <email@hidden>
  • Date: Thu, 30 Nov 2006 21:21:58 +0100

Op 30-nov-2006, om 14:50 heeft vibhatha v het volgende geschreven:

Hi,

i have an NSOutlineView in which i have populated the values.
i am using NSTreeController for the same.

i now want to get the values of the attributes for the selected row of the
outline view.
When i try to print thes values, i get empty set.


i am using the function [outlineView1 selectedObjects] to get the selected
row objects.


But i am not able to print the selected objects.

Have i gone wrong anywhere here?
How do i get the vales selected from my outline view?

The short answer is that you don't. You get the selectedObjects from the *controller*, not from the view. And to be able to talk to the controller, you need to create an IBOutlet for it. How you do that, you can learn in Currency Converter tutorial:
http://developer.apple.com/documentation/Cocoa/Conceptual/ ObjCTutorial/chapter01/chapter_1_section_1.html


Elise van Looij


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSTreecontroller outline view selectedObjects is empty (From: "vibhatha v" <email@hidden>)

  • Prev by Date: [MEET] December CocoaHeads Meetings
  • Next by Date: Re: NSCursor problem
  • Previous by thread: NSTreecontroller outline view selectedObjects is empty
  • Next by thread: Getting Subject and Keywords into PDFAttribute dictionary
  • Index(es):
    • Date
    • Thread