sastowe
12 years agoSuper Contributor
VB 6 control arrays with different indices and runtime
So I was creating a script to test something in my app. The object I needed was a button under the IMResize_3 object. I used name mapping. Looked lovely. When I ran the project, I receive the following message in the log
There are several objects in the system that match the recognition attributes of the "IMResize_3" mapped object.
This may cause the "Object not found" error.
Objects
....VBObject("imcfgedForm").VBObject("IMResize")
....VBObject("imcfgedForm").VBObject("IMResize_2")
....VBObject("imcfgedForm").VBObject("IMResize_3")
To solve the problem, you may need to modify mapping settings for the "IMResize_3" object or one of its parent objects.
On the form, there is only one IMResize object, I think. At form load or whatever they are doing, the programmers must be creating a control array or some such. Runtime when I observe the object, it looks like it is under IMResize_2.
I have a button under that resize object that I want to click. This is where the error is occuring.
How does one use name mapping in a situation like this to make the code cler yet still find the object.
I read about conditional mapping, but I confess it remains unclear to me and may not apply to this situation at all.
Thanks
There are several objects in the system that match the recognition attributes of the "IMResize_3" mapped object.
This may cause the "Object not found" error.
Objects
....VBObject("imcfgedForm").VBObject("IMResize")
....VBObject("imcfgedForm").VBObject("IMResize_2")
....VBObject("imcfgedForm").VBObject("IMResize_3")
To solve the problem, you may need to modify mapping settings for the "IMResize_3" object or one of its parent objects.
On the form, there is only one IMResize object, I think. At form load or whatever they are doing, the programmers must be creating a control array or some such. Runtime when I observe the object, it looks like it is under IMResize_2.
I have a button under that resize object that I want to click. This is where the error is occuring.
How does one use name mapping in a situation like this to make the code cler yet still find the object.
I read about conditional mapping, but I confess it remains unclear to me and may not apply to this situation at all.
Thanks