Behavior of CtrlGetText
Posted 07 September 2009 - 13:58
First edit box - collect the user name
Second and third edit boxes - collect the passwords
When the user clicks on the next button, the data in all of these text boxes is collected into installscript variables using CtrlGetText.
The data collected from the the first edit box is eventually passed as an input argument to a C# library. Upon debugging the C# library this data is getting passed from Installscript to C# with the appending of a large number of \0 characters. Upon debugging the installscript project, this is not evident in the installscript debugger.
However when the C# library is debugged, this becomes evident in the Visual studio debugger.
So for example: if the data entered in the first text box is abc, this is getting appeneded with lots of \0 characters before being passed to the C# function.
The strange thing is that the data in the second and third text boxes is passed intact. When i trim the data got from the first text boxes for trailing spaces, this problem ceases to exist.
1)Is there any attribute i need to set on the text boxes which would prevent this from happening or is this something random and is exhibited by installscript?
2)Is this something random?
3)After collecting the data from the text boxes, i am using StrLengthChars function on the data. Is this function appending the \0 characters?
Posted 07 September 2009 - 16:38
Posted 08 September 2009 - 06:28
If this is the case, then why is it that the data in the other text boxes do not have this problem?
Posted 08 September 2009 - 13:30
Maybe the length of the password string buffer matches exactly the number of characters that a user is allowed to enter, while the user name box isn't full? What happens if you enter fewer characters in the password fields?
Posted 09 September 2009 - 12:54
BTW, there is one thing. This project file(.ism ) was earlier in IS 11.5 professional format. We upgraded the project to IS 2009 format. After this upgrade, this was the only text box which was added. So does Install Shield exhibit strange behaviours in such cases?
Posted 11 September 2009 - 11:40
Is there any setting within InstallShield 2009 IDE which allows me to specify if the strings in the text boxes get passed as Unicode or ANSI?
Posted 12 September 2009 - 01:39
Posted 23 September 2009 - 15:31
Perhaps the unicode shift causes this interface change as well.
Unless I've done something wrong, I would consider this a bug in the software.