Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-14 Thread Charley Baker
Hey aidy, There aren't any attribute accessors for class variables. Why? You could I suppose, but you'd want to keep them accessible only by methods in the class. I think I'm starting to understand your general question or I could be totally offbase. Say for instance to take a classic example

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-14 Thread aidy lewis
On 14/05/07, Charley Baker <[EMAIL PROTECTED]> wrote: > class LoginInput > @@user_name = "Vipul.Goyal" > > def LoginInput.user_name > @@user_name > end > end > > puts LoginInput.user_name > => "Vipul.Goyal" > > # Now with instance: > class LoginInput > @@user_name = "Vipul.Goyal" > >

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-14 Thread Charley Baker
Ah, you're using a class variable and you have no accessor methods so it's only available to . You'll need to add a class accessor or an instance method if you're creating object of type LoginInput to get at the value: class LoginInput @@user_name = "Vipul.Goyal" def LoginInput.user_name @

[Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-14 Thread aidy lewis
>On 14/05/07, Vipul <[EMAIL PROTECTED]> wrote: > class LoginInput >@@userName = "Vipul.Goyal" > end > $ie.text_field(:id,"txtLoginID").set(LoginInput.userName) I think the OO idea is that the client should not be able to directly access a variable outside a class. class Login_Input at

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-14 Thread aidy lewis
On 14/05/07, Vipul <[EMAIL PROTECTED]> wrote: > class LoginInput >@@userName = "Vipul.Goyal" > end > $ie.text_field(:id,"txtLoginID").set(LoginInput.userName) I think the OO idea is that the client should not be able to directly access a variable outside a class. class Login_Input attr

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-13 Thread Vipul
yes i have checked the casing input.rb class LoginInput @@userName = "Vipul.Goyal" end main.rb $ie.text_field(:id,"txtLoginID").set(LoginInput.userName) exception 'undefined method `userName' for LoginInput:Class (NoMethodError)' ___ Wtr-gener

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-11 Thread Charley Baker
Looks like user_Name is not defined for your LoginInput class. Check your casing and make sure it exists there. Might be something like user_name, not user_Name. Otherwise we'd have to have more information on your LoginInput class. -Charley On 5/11/07, Vipul <[EMAIL PROTECTED]> wrote: now i a

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-11 Thread Vipul
now i am getting following exception 'undefined method `user_Name' for LoginInput:Class (NoMethodError)' in main source file contains the code require 'Input.rb' $ie = IE.new() $ie.goto(test_site) $ie.text_field(:id,"txtLoginID").set(LoginInput.user_Name) ___

Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-11 Thread aidy lewis
> class initialValues Use an upper case 'I' for class name. @@ means class variable. Aidy On 11/05/07, Vipul <[EMAIL PROTECTED]> wrote: > hi > > i have tried following > > class initialValues >@@user_name = 'atilla' >@@last_name = 'ozgur' > end > save in intial.rb file. > > But when i

[Wtr-general] Solution for FAQ "Using key/value pairs" not working

2007-05-10 Thread Vipul
hi i have tried following class initialValues @@user_name = 'atilla' @@last_name = 'ozgur' end save in intial.rb file. But when i use intial.rb file in main file i get syntax error ' class/modulename must be a constant.' Also @@ means global variable inside class?