Re: [Gambas-user] Form.Show by name as string of form

2014-04-29 Thread Ru Vuott
Hello Jussi, I tried your suggestion, but an error-notice is raised: Not an object To use your Collection, I had to modify the code so: Private hMyForms As New Collection hMyForms.Add(Form_name_1,Form_name_1) hMyForms.Add(Form_name_2,Form_name_2)

Re: [Gambas-user] Form.Show by name as string of form

2014-04-29 Thread Jussi Lahtinen
I tried your suggestion, but an error-notice is raised: Not an object Where the error comes? I just tested the code and it works on my system. How do you declare the forms? Object.Call(hMyForms[Form_name_1], Show, Null) This should be same thing than hMyForms[Form_name_1].Show.

Re: [Gambas-user] Form.Show by name as string of form

2014-04-29 Thread Ru Vuott
Hi Jussi, I created the Forms via IDE and I attributed your names to them. With regard to error, I attached a file immage about it. bye vuottt P.S.: My system: [System] Gambas=3.5.90 OperatingSystem=Linux Kernel=3.11.0-12-generic Architecture=x86_64 Distribution=Linux Mint 16 Petra

Re: [Gambas-user] Form.Show by name as string of form

2014-04-29 Thread sfdadds
' As the class is specified by name, only exported classes can be instanciated. ' could try dynamic load of a form by name hButton = Object.New(Button, [hParent]) 'has exactly the same effect as: hButton = NEW Button(hParent) -- View this message in context:

[Gambas-user] Form.Show by name as string of form

2014-04-28 Thread abbat81
Hi, I have a four forms in my project: Form_name_1 Form_name_2 Form_name_3 Form_name_4 Form_name_5 How can I show a form by name of a form by string. Public Sub Button1_Click() Dim Form_name As String = Form_name_2 Form_name.Show End -- View this message in context:

Re: [Gambas-user] Form.Show by name as string of form

2014-04-28 Thread Jussi Lahtinen
Private hMyForms As New Collection() hMyForms.Add(Form_name_1,Form_name_1) hMyForms.Add(Form_name_2,Form_name_2) hMyForms.Add(Form_name_3,Form_name_3) ... hMyForms[Form_name_1].Show() Jussi On Mon, Apr 28, 2014 at 10:54 AM, abbat81 abbat...@mail.ru wrote: Hi, I have a four forms in my