Hello everyone,
I am creating a tableview and using NSDictionaryController.
My data comes from
case.dict file
I am using this code:
Code:
@interface MyClass : NSWindowController{
IBOutlet NSTableView *tableView;
IBOutlet NSDictionaryController *dictController;
IBOutlet NSArrayController *peopleList;
NSDictionary *currentPerson;
}
@property (retain) NSDictionary *currentPerson;
MyClass.m file
Code:
- (void)windowDidLoad
{
[super windowDidLoad];
NSBundle *bundle = [NSBundle mainBundle];
NSString *path = [bundle pathForResource: @"case" ofType: @"dict"];
NSArray *listFromFile = [NSArray arrayWithContentsOfFile: path];
[tableView setSortDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"icon" ascending:YES] autorelease]]];
[peopleList addObserver:self forKeyPath:@"selectionIndexes" options:NSKeyValueObservingOptionNew context:nil];
if (listFromFile != nil)
{
[peopleList addObjects:listFromFile];
}
[peopleList setSelectionIndex:0];
[dictController bind:NSContentDictionaryBinding toObject:self withKeyPath:@"currentPerson" options:nil];
}
It works fine and table gives me image names which are stored in case.dict file at index 0(ZERO).
Now can any one explain me how i get all images but not their names in table?
I am new to cocoa development.
If there is any other way to do this then also tell me. But i want my data from file only..
Please help me to solve this

Any help will be appreciated..!!
Thanks..!!
Edit : this can give u more detail about my problem
http://stackoverflow.com/questions/7...active#tab-top