Nice.
For some reason for ComboBox and Slider Control names are not being retrieved. They are accessible though!
I don't know why.
Because toString() gives out, what is in the toString() function defined and not what the name of the object is. But the function have to output a good description, because that is, what is expected, if toString() is called.
For CommandButton it is this one:
[
http://code.google.com/p/jabacoframework…svn128&r=90#114 ]
and for ComboBox it is this one:
[
http://code.google.com/p/jabacoframework…vn128&r=116#244 ]
Or for example, you can create a new SDI-project with one button, and write
|
Jabaco Source
|
1
2
3
|
Public Sub Command1_Click()
Debug.print Me
End Sub
|
This outputs for example
|
Source code
|
1
|
Form1[frame0,386,263,508x434,layout=java.awt.BorderLayout,title=Form,resizable,normal,defaultCloseOperation=EXIT_ON_CLOSE,rootPane=javax.swing.JRootPane[,4,30,500x400,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
|
But this default description is only done by the Java Runtime.
You can overwrite it with
|
Jabaco Source
|
1
2
3
4
5
6
7
|
Public Sub Command1_Click()
Debug.print Me
End Sub
Public Function toString() As String
toString = "I am the Form component"
End Function
|
Now it gives out
I am the Form component
And in Jabaco it works like in Java. A "Debug.print Me" is the same like "Debug.print Me.toString()". And "Debug.Print Me.Controls.get(i).toString" is the same like "Debug.Print Me.Controls.get(i)"
And "Debug.Print Me.Controls.get(i).getClass" is the same like "Debug.Print Me.Controls.get(i).getClass.toString".
But you are right, that the toString()-output of the ComboBox and Slider Control are empty, are not ok. So it should be fixed, to find a better description for it.
Greatings
theuserbl