Try looking at where the radio methods are defined in watir, that
should give you a clue.
In input_elements.rb, the declaration of Radio functions look like
this:
Module Watir
class Radio < RadioCheckCommon
def myMethod
puts "this is my method
end
end
end
-Dylan
On Aug 11, 12:56 am, John Kolokotronis <[email protected]> wrote:
> Hi All,
>
> I thought my understanding of Ruby classes was getting a bit better
> but I can't seem to add a new method to Watir::Radio, without breaking
> all functionality for radio buttons... E.g. I tried adding a dummy
> method like this:
>
> class Watir::Radio
> def myMethod
> puts "this is my method"
> end
> end
>
> When I then call the method or any other existing method, like
> "isSet?", I get error messages about the number of arguments given:
>
> wrong number of arguments (4 for 0)
>
> whenever I try to call any method from the Watir::Radio class. What
> I'm doing wrong? How can I extend Watir::Radio, without messing with
> the main watir.rb files? Thanks in advance.
>
> Regards,
>
> John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---