OutlineView
OutlineView
- Subject: OutlineView
- From: "Amit Kumar(R&D)" <email@hidden>
- Date: Wed, 1 Dec 2004 14:09:17 +0530
Title: OutlineView
Hi,
I am trying to add some static data upto more than 2 levels in a OutlineView.I am stuck here and only able to add up to one level.
Any help will highly appriciated.
My code is as;
-(void) showData
{
int selectedRow = -1;
Node *n = [outlineView itemAtRow:selectedRow];
Node *newChild= [[Node alloc]init];
[newChild setValue:@"The Daily News" forKey:@"title"];
if(selectedRow == -1)
[rootNode addChild:newChild];
else
selectedRow = 0;
n = [outlineView itemAtRow:selectedRow];
[n expandable];
newChild= [[Node alloc]init];
[newChild setValue:@"Business" forKey:@"title"];
[n addChild:newChild];
[rootNode childAtIndex:0];
[outlineView reloadData];
[n expandable];
selectedRow = 0;
n = [outlineView itemAtRow:selectedRow];
[n expandable];
newChild= [[Node alloc]init];
[newChild setValue:@"City" forKey:@"title"];
//[rootNode addChild:newChild];
[n addChild:newChild];
[outlineView reloadData];
[newChild release];
}
Thanks in advance.
Regards
Amit Kumar (Ext.No. 9490)
Member - Software Development Group,IPG
Quark Media House Pvt. Ltd.
A-45, Phase VIII-B
Industrial Area
Mohali(Panjab)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden