Thursday, 25 February 2010

Issue with putting a tableview inside a scrollview inside a tab view


i'm experimenting making irc program. if you're not familiar irc, can multiple channels @ once. in client, can switch channels (chat rooms) , chat log nick list (the list of other people in channel) reflect in current channel.

decided put each channel in it's own tab view. exercise, made tabview tabless, , put nsbuttons @ top of window can switch between channels.

made nick list on right side of screen scrollable, since channels have hundreds of participants. made mockup of user interface, , can enter name of channel , click + button, , 'create' channel. adds button tab, textview chat, , scrollview tableview inside nick list.

here's problem. create channel when program begins. appears fine. when add new channel, doesn't work! can switch first channel, , appears right.

first tab looks like, , want others like:
[​img]

code:
        [[newtab view] addsubview:newchannel.nickscrollview];          [[newtab view] addsubview:newchannel.nicklist];
produces this:
[​img]

code:
        [newchannel.nickscrollview setdocumentview:newchannel.nicklist];          [[newtab view] addsubview:newchannel.nickscrollview];
produces this:
[​img]

if change code add scrollview , tableview tabview, both show up. if change put table inside scroll view, shows doesn't draw columns or data. datasource methods never called. colored scrollview blue , tableview gray debugging purposes.

i'm sure it's simple. have memory leaks in code (and other issues) i'm worried scrollview issue now. project attached , if took appreciate it.
 

attached files:

i believe when create tableview embedded in scroll view, may doing more need here.
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment