strange "NoMethodError" ???

U

Une bévue

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

/path/to/MacSOUPSwitcherTK.rb:91:in `prefs_setup': undefined method
`default_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 ))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top