My first steps in class construction

Hi!
I am doing my first steps in class construction and here my question, I hope I can explain myself well.

There are 2 variables defined in the .inc V1 string (10) and V2 string (10)

in the INIT method I make V1 = V2

now in the app I do (in a button)

V2 = ‘hello’

I call INIT ()

message (V1)

does not assign the value of V2 to V1

Where am I going wrong?

Did you assign a value to V2 ?
Always easiest to experiment with Classes using a simple Win32.EXE project rather than separate .INI and .CLW files - they can get confusing initially.

So as an example this works doing what you require

PROGRAM

MAP
END

MyClass CLASS,TYPE
V1 string(10)
V2 string(10)
init procedure()
end

instance MyClass

CODE
    instance.V2 = 'Hello'
    instance.init()      
    
    message('V1 ' & instance.V1 & | 
        '|V2 ' & instance.V2)

MyClass.init procedure()

code
    self.V1 = self.V2

problem solved. Thank you