07-16-2012, 06:03 AM
Hi guys,
Can anyone help me with what I'm trying to do here? I'm trying to get the properties (developer name, attached text) of several objects (edit boxes, tables, buttons, etc.) from a Java application. Here's the code I'm using:
The thing is, the objWindow.ChildObjects(getElement).Count always returns 0, even though I can access the objects in the form with descriptive programming (using the attached text and developer name as identifiers). Can anyone help me with the object description? I'm guessing that there's something wrong with how I described the objects that's why the ChildObjects() is returning a zero.
Also, what's the huge difference between using the micclass from Class Name? Oftentimes, micclass doesn't work when I'm using it for object descriptions, and Class Name just fits the bill...
Can anyone help me with what I'm trying to do here? I'm trying to get the properties (developer name, attached text) of several objects (edit boxes, tables, buttons, etc.) from a Java application. Here's the code I'm using:
Code:
Function CreateObjectConfig(objWindow, strTblName, strObjectClass, strPage)
Set getElement = Description.Create()
getElement("Class Name").Value = strObjectClass
getElement("micclass").Value = strObjectClass
If strObjectClass = "JavaEdit" Then
getElement("class description").value = "edit"
getElement("toolkit class").value = "model.UIMaskedTextField"
End If
MsgBox objWindow.ChildObjects(getElement).count
Set newObject = objWindow.ChildObjects(getElement)
strFieldName = ""
For ctrElement = 0 to getElement.Count - 1
strDeveloperName = getElement(ctrElement).GetROProperty("developer name")
If InStr(1, UCase(strObjectClass), "BUTTON") > 0 Then
strAttachedText = newObject(ctrElement).GetROProperty("attached text")
ElseIf InStr(1, UCase(strObjectClass), "EDIT") > 0 Then
strAttachedText = newObject(ctrElement).GetROProperty("attached text")
ElseIf InStr(1, UCase(strObjectClass), "EDIT") > 0 Then
strAttachedText = newObject(ctrElement).GetROProperty("attached text")
End If
If Len(strAttachedText) = 0 or strAttachedText = "|" Then
strAttachedText = "***"
End If
Next
...
End Function
The thing is, the objWindow.ChildObjects(getElement).Count always returns 0, even though I can access the objects in the form with descriptive programming (using the attached text and developer name as identifiers). Can anyone help me with the object description? I'm guessing that there's something wrong with how I described the objects that's why the ChildObjects() is returning a zero.
Also, what's the huge difference between using the micclass from Class Name? Oftentimes, micclass doesn't work when I'm using it for object descriptions, and Class Name just fits the bill...