From: "David A. Black" Date: 2008-10-03T03:26:18+09:00 Subject: Re: Problem extending (adding methods) to class Hi -- On Fri, 3 Oct 2008, Nit Khair wrote: >> No. If you want to add methods to it, you can just open it up and add >> them: >> >> require 'rubygems' >> require 'ncurses' >> >> class Ncurses::Form::FORM >> def my_method >> puts "Hello" >> end >> end >> >> n = Ncurses::Form::FORM.new >> n.my_method # Hello >> >> >> David > > That is precisely what i did. It worked. But I am unable to further > subclass it. Methods I am adding to the subclass are giving > NoMethodErrors. Can you try this and tell me what you get? class MyForm < Ncurses::Form::FORM def a_new_method puts "Hi" end end MyForm.new.a_new_method David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!