rkumar / rbcurse

ruby based curses widgets: fields, buttons, textarea. menus, message boxes, tabbed panes, tables, listboxes, splitpanes, scrollpanes. Event based, MVC architecture. (DEPRECATED - PLS USE rbcurse-core)
http://totalrecall.wordpress.com/
138 stars 15 forks source link

Window layout with size 0 don't working #8

Closed rhapsodyv closed 13 years ago

rhapsodyv commented 13 years ago

Hi,

In 'rbcurse-1.1.5/lib/ver/window.rb' (root_window and create_window) the default value for window layout is: { :height => 0, :width => 0, :top => 0, :left => 0 } but, it makes Ncurses.new returns Nil. Setting height and width greater than 0 solves the problem. I think the default could be the screen size.

I'm using ncurses-1.2.4 and rbcurse-1.1.5. Mac 10.6.7 with ruby 1.8.7.

[]s Victor

rkumar commented 13 years ago

Have you tried the samples. All the samples (examples) use 0, as zero results in the window taking up all the screen. Ncurses itself will convert 0 to screen size. If the examples work, perhaps there is some error in your program. If the examples do not work, I would suggest you try the examples that ncurses itself provides. I just want to ensure that ncurses itself is working fine since this is a very basic thing.

rhapsodyv commented 13 years ago

I'm using your samples. The ncurses samples have the same problem. Window with a 0 in height or width don't work. Maybe my ncurses lib have a problem. I'm using it from macports:

ncurses @5.8, Revision 1 (devel) Variants: universal

rkumar commented 13 years ago

Yes, this seems to be a macport issue then. You might upgrade it, or try 5.7.

rhapsodyv commented 13 years ago

ncurses 5.9 works fine!! Thanks for your help.