David A. Black wrote:
> Hi --
> 
> On Fri, 3 Oct 2008, Nit Khair wrote:
> 
>>> Similarly if you want to subclass ClassC, you can do it inside ModuleM
>>> or outside:
>> class AForm < Ncurses::FORM
> I don't think it was exactly this, because there is no Ncurses::FORM.
> Try the code in my previous post and see if it works for you. If not,
> please post some actual code that triggers the error you're talking
> about. I can't duplicate it.
> 
> 
> David

Maybe we are onto something. Your code works fine. But doesn't FORM.new 
require a fields object ?  I tried many variations so i cant remember 
what it was but here is the last one I have before i rewrote.


include Ncurses
include Ncurses::Form

class RBForm < FORM
  attr_accessor :ffields
  def initialize(fields)
    super(fields)
    @ffields = fields
  end
  def set_ffields(fields)
    @ffields = fields
  end
  def get_ffields
    @ffields
  end
end


get_ffields throws a NoMethodError.
If i access ffields, that too gives an error.

It is instantiated thus:
    f=RBQueryForm.new(fields);

RBQueryForm is subclassed from RBForm.

See if you can spot the error here itself. Otherwise I will try to cut 
and make a tiny version that you can run and see.
-- 
Posted via http://www.ruby-forum.com/.