[Gambas-user] Buttons again not working

M. Cs. mohareve at ...626...
Wed Dec 9 14:15:42 CET 2009


I don't understand why is the handling of dynamically created forms so
complicated!
I've barely managed to shut a modal dialog, I'm encountering a new problem:

when I invoke the procedure Messenger:

PUBLIC SUB Messenger(tekst AS String, slika AS String)
DIM imge AS PictureBox
DIM conti AS TextLabel
DIM butty AS Button
DIM i AS Integer
keret = NEW Form
keret.Width = 500
keret.Height = 300
keret.Border = FALSE
imge = NEW PictureBox(keret)
imge.x = 10
imge.y = 10
imge.Width = 280
imge.Height = 280
imge.Border = TRUE
imge.Picture = Picture[slika]
conti = NEW TextLabel(keret)
conti.x = 300
conti.y = 20
conti.Width = 190
conti.Height = 230
conti.Text = tekst
butty = NEW Button(keret)
butty.x = 340
butty.y = 250
butty.Width = 120
butty.Height = 25
butty.Text = "OK"
keret.Center
Object.Attach(butty, ME, "Ops")
keret.ShowModal()
END

PUBLIC SUB Ops_Click()
keret.Close()
END

from within the
PUBLIC SUB _new()
...
Messenger("blabla.txt","blabla.jpg")
...
END

procedure,

I cannot communicate with the button "butty". This info window is the first
thing which is popping up, but either the program would just go just
straight ahead, not waiting for the button to be pushed (when I use only
keret.Show() instead), or I have a pop-up window which stops the program,
and stops its execution, since I cannot close / delete it.

A second question: how could I write documentation for Gambas2. It's still
desperately underdocumented, and some crucial things are missing (examples,
examples, examples)



More information about the User mailing list