ho una classe fatta da milio per gambas 2, ora la volevo usare su gambas 3 e mi dà il seguente errore.
Invalid Object
Private Obs As Observer
Private Px As New Integer[]
Private Py As New Integer[]
Private Pw As New Integer[]
Private Ph As New Integer[]
Private Fs As New Integer[]
Private Mw As Integer
Private Mh As Integer
Private cy As Float
Private cx As Float
Private Obj As Object
Public Sub _New(Parent As Object)
Dim hControl As Object
Obs = New Observer(Parent) As "Form"
Obj = Parent
For Each hControl In Obj.Controls
Px.Add(hControl.x) '<<<< qui si genera l'errore
Py.Add(hControl.y)
Pw.Add(hControl.w)
Ph.Add(hControl.h)
Fs.Add(hControl.Font.size)
Next
Mw = Obj.W
Mh = Obj.h
End
Public Sub Form_Resize()
Dim hControl As Object
Dim Nw, Nh, i As Integer
Nw = Obj.W
Nh = Obj.h
Cx = Nw / Mw
Cy = Nh / Mh
i = 0
For Each hControl In Obj.Controls
hControl.x = Px[i] * Cx
hControl.y = Py[i] * Cy
hControl.w = Pw[i] * Cx
hControl.h = Ph[i] * Cy
hControl.Font.size = Fs[i] * Cx
Inc i
Next
End