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

undefined method `smaxrow' for Ncurses:Module (rbcurse19) #1

Closed indrekj closed 14 years ago

indrekj commented 14 years ago

In VER::Pad#copy_pad_to_win: @otherwin is not always a Pad object. It is sometimes a VER::Window object, but VER::Window does not have the smaxrow method.

code and error log: http://gist.github.com/273597

I now that rbcurse19 is under development, but just letting you know.

rkumar commented 14 years ago

Yes, I did not know anyone was looking ;-) Pad extends Window and adds methods to it.

I would not really expect a user to be doing anything that has to differentiate between these, actually the widgets may be concerned, And this is only if you are embedding one widget inside another such as SplitPane or Scrollpane (and also TabbedPane).

Perhaps you are using some older code. There are major changes happening. I now only use pads if you are embedding. Thus, for all other practical purposes all widgets would be only using one window class and writing to it.

The difference between pads and windows only comes in Class Form in def repaint where i check the type and either call wrefresh or buffer_to_screen depending on type.

I am currently working on textviews within splitpanes and its coming along fine.

rkumar commented 14 years ago
  if @window.window_type == :WINDOW
     @window.wrefresh
   else   
     if @parent_buffer!=nil
       @window.set_backing_window(@parent_buffer)
       @window.copy_pad_to_win
     end
   end    

From rwidget.rb, class Form, def repaint.

rkumar commented 14 years ago

Just checked Yes TabbedPane is broken due to some major change in Form and Widget (and Window).

I will get around to rectifying it asap. Thanks.

indrekj commented 14 years ago

Someone is always watching :P

Thanks for the info. That was fast.