Re: NSOutlineView init problem
Re: NSOutlineView init problem
- Subject: Re: NSOutlineView init problem
- From: Brent Gulanowski <email@hidden>
- Date: Thu, 27 Jun 2002 19:07:31 -0400
On Thursday, June 27, 2002, at 03:52 AM, Ken Tozier wrote:
I wrote a generateTestData method for my outline data source and can't
get it to work in anything except the data source's init method. When I
put the exact same line of code in the awakeFromNib method, all I get is
an empty outline. I tried sending the outline a refreshItem message in
the awake from nib method but it still winds up empty. Also added
NSLog()'s to see what sequence the code was being executed in and the
init is called before awakeFromNib but it simply doesn't work. Anyone
have any ideas what might be going on?
It's not completely clear to me what you're saying. Let me paraphrase what
I think I'm reading:
The outline view and its data source are both in the nib.
The test data is generated programmatically when the -generateTestData
method is called.
The data source calls this method on itself.
It should not matter when the data gets generated, as long as the outline
view gets sent a -reloadData (or (-reloadItem:reloadChildren: on the root
item) message afterward, its outlet is correctly connected, and the
required data source methods are implemented. Apparently the last two are
satisfied, since *sometimes* the data is properly loaded. So could you
have the method name wrong (or did you just misquote it here)? You'd know
if you sent the wrong message since there would be an error message in the
console.
With the message sent from the data source's -awakeFromNib, are you
confirming that the data does in fact get generated? Try the debugger
instead of NSLog()'s -- it won't bite! Put a breakpoint in the
-awakeFromNib, step through, and check your instance data after
-generateTestData gets called.
Brent
Thanks
Ken Tozier
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
Brought to you by Mail on Mac OS X. Think Different.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.