# Ncurses Panel userptr issues

**URL:** <https://www.ruby-forum.com/t/ncurses-panel-userptr-issues/149109>\
**Category:** Ruby\
**Created:** [September 20, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/ncurses-panel-userptr-issues/149109 "2008-09-20T18:33:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [September 20, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/ncurses-panel-userptr-issues/149109/1 "2008-09-20T18:33:57Z")

</div>

I am having issues with the userptr in Ncurses Panel. The C program I  
converted from runs fine on my system.  
([http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html](http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html) - the one  
that takes tabs to travel through 3 panels).

I wrote it in ruby, the 3 panels display fine, but the program  
terminates on tabbing with no message.

I feel the issue lies in the userptr - I have no samples to go on. Can  
someone check this out. I tried both these variations:

Ncurses::Panel.set\_panel\_userptr(my\_panels[0], my\_panels[1]);  
Ncurses::Panel.set\_panel\_userptr(my\_panels[1], my\_panels[2]);  
Ncurses::Panel.set\_panel\_userptr(my\_panels[2], my\_panels[0]);  
#my\_panels[0].set\_panel\_userptr( my\_panels[1]);  
#my\_panels[1].set\_panel\_userptr( my\_panels[2]);  
#my\_panels[2].set\_panel\_userptr( my\_panels[0]);

Later on tabbing my code is:

when 9:  
top = Ncurses::Panel.panel\_userptr(top);  
Ncurses::Panel.top\_panel(top);  
break;

Thanks in advance.
