• 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
OutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

          [n addChild:newChild];

              [outlineView reloadData];
              [n expandable];
              [newChild release];
              selectedRow = 0;
              n = [outlineView itemAtRow:selectedRow];
              newChild= [[Node alloc]init];
              [newChild setValue:@"Main Book" forKey:@"title"];
              [n addChild:newChild];
              [n expandable];
              [rootNode childAtIndex:0];
              [outlineView reloadData];
              [newChild release];

        
                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

  • Follow-Ups:
    • Re: OutlineView
      • From: Scott Stevenson <email@hidden>
    • Re: OutlineView
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: RE: Swapping isa's (was Re: Hex Edit controls (resknife))
  • Next by Date: Re: Strangeness when moving data through an array.
  • Previous by thread: RE: Off-screen Printing
  • Next by thread: Re: OutlineView
  • Index(es):
    • Date
    • Thread