I am currently working on a project on a server using Windows Server 2003 and I am creating my test automation suite right on the server itself.
I've noticed a couple of issues and I wanted to know if anyone else has seen the problem or if it is maybe limited to Win2K3 Server.
I have a couple of sub routines, one that was called getWindow and another called setSystemTime.
When I was first porting some code from another project, I had noticed that I was getting the error "Wrong number of arguments of invalid property assignment." whenever I called it. I thought it was odd, but it seemed to clear up when I changed the sub routine name of retWindow.
Now, today, I was porting over some other code for this setSystemTime routine and I started getting the same error. Once again, I changed the routine name to resetSystemTime and it cleared up.
So my question is, are we not able to use reserved words at the beginning of sub routine or function names?
Actually, Brent, did a quick lookup and, sure enough, those routine names are already in use.
Take a look at the Win32API object and you'll see GetWindow and SetSystemTime already in there. It might not necessarily be the reserved words in your routine name but the fact that the Win32API already has functions called that.
According to TC 6.2 help:
[ QUOTE ]
The available functions are shown in the Code Completion window under the Win32API node. The plug-in adds this object to TestComplete and the supported Win32 functions become methods of this object. However, you can skip the object name (Win32API) when calling these functions.
[/ QUOTE ]
So, simply calling the names within your code invoked the plugin object... and Bob's your uncle.
Huh, whadda ya know, so they are. Shoot, I must be better at naming sub routines than I thought. People have obviously gone into the future, stolen my ideas, and then gone back in time and implemented them before I thought of them. Interesting......