I'm experimenting with making an IRC program. If you're not familiar with IRC, you can be multiple channels at once. In the client, you can switch channels (chat rooms) and the chat log as well as the nick list (the list of other people in the channel) will reflect what is in your current channel.
I decided to put each channel in it's own tab view. Then as an exercise, I made the tabview tabless, and put some nsbuttons at the top of the window so you can switch between channels.
I made the nick list on the right side of the screen scrollable, since some channels have hundreds of participants. I made a mockup of the user interface, and you can enter the name of a channel and click the + button, and it will 'create' that channel. It adds a button for the tab, a textview for the chat, and an scrollview with a tableview inside for the nick list.
Here's my problem. I create a channel when the program begins. It appears fine. But when I add a new channel, it doesn't work! I can switch back to the first channel, and it appears right.
This is what the first tab looks like, and what I want the others to look like:
Produces this:
Produces this:
If I change the code so that I just add the scrollview and the tableview to the tabview, they both show up. But if I change it to put the table inside the scroll view, it shows up but doesn't draw any columns or data. My datasource methods never get called. I colored the scrollview blue and the tableview gray for debugging purposes.
I'm sure it's something very simple. I have some memory leaks in my code (and probably other issues) but I'm just worried about the scrollview issue for now. My project is attached and if anyone took a look I would appreciate it.
I decided to put each channel in it's own tab view. Then as an exercise, I made the tabview tabless, and put some nsbuttons at the top of the window so you can switch between channels.
I made the nick list on the right side of the screen scrollable, since some channels have hundreds of participants. I made a mockup of the user interface, and you can enter the name of a channel and click the + button, and it will 'create' that channel. It adds a button for the tab, a textview for the chat, and an scrollview with a tableview inside for the nick list.
Here's my problem. I create a channel when the program begins. It appears fine. But when I add a new channel, it doesn't work! I can switch back to the first channel, and it appears right.
This is what the first tab looks like, and what I want the others to look like:

Code:
[[newTab view] addSubview:newChannel.nickScrollView];
[[newTab view] addSubview:newChannel.nickList];

Code:
[newChannel.nickScrollView setDocumentView:newChannel.nickList];
[[newTab view] addSubview:newChannel.nickScrollView];

If I change the code so that I just add the scrollview and the tableview to the tabview, they both show up. But if I change it to put the table inside the scroll view, it shows up but doesn't draw any columns or data. My datasource methods never get called. I colored the scrollview blue and the tableview gray for debugging purposes.
I'm sure it's something very simple. I have some memory leaks in my code (and probably other issues) but I'm just worried about the scrollview issue for now. My project is attached and if anyone took a look I would appreciate it.