Ncurses Panel userptr issues

N

Nit Khair

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 - 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.

Attachments:
http://www.ruby-forum.com/attachment/2713/threepanels.rb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top