Strange "NoMethodError"?

i run a RubyCocoa app and i get this error message :

/path/to/MacSOUPSwitcherTK.rb:91:in prefs_setup': undefined methoddefault_server_index=’ for #Servers:0x74edec (NoMethodError)
from /path/to/Controller.rb:47:in `initialize’
from /path/to/rb_main.rb:22

the line itself being :

ss.default_server_index = old_ss.defaultServerIndex

with ss being defined as :
ss=Servers.new

then, i did a :

p Server.public_instance_methods

giving to me :

[… “default_server_index”, …, “default_server_index=”, …]

obviously because of :

class Servers
attr_accessor :servers, :default_server_index, :are_running

def initialize
@servers=[]
@default_server_index=0
@are_running=false
end

[…]
end

then i’m stuck ))

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs