Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTreecontroller outline view selectedObjects is empty



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.