CompuServe Thread

#Ctl Array Creation BUG

5 messages in this thread
#3002From: Keith Funk/Vanc.BC,CAN.Oct 14, 1991 1:53 PM
Hi Don, I don't know if this bug has been reported yet. If you create a control and add code to one of its events and then decide to make it into a control array, VB does not add the Index As Integer argument to the control's argument list. When you attempt to run the program, VB gives the error, "Incorrect number of event procedure arguments". To duplicate the problem. 1. Add two command buttons named Command1 and Command2 to a Form. 2. In the Command1_Click event add the code: Print "hello" 3. Change the CtlName of Command2 to Command1. Answer Yes when asked if you want to create a control array. 4. Look at the Command1_Click event. Index As Integer has not been added to the event's argument list. 5. Try running the program. VB will give the error, "Incorrect number of event procedure arguments." I ran across this problem some time ago and couldn't figure out what was going on. It was Dan Appleman that explained the problem and how to duplicate it. KeithF There are 2 Replies.
#3019From: Mark Novisoff/MicroHelpOct 14, 1991 3:33 PM
Keith, Hmmm. Is this known as "Funk-to-Funk" communications protocol? Mark There are 2 Replies.
#3054From: Keith Funk/Vanc.BC,CAN.Oct 14, 1991 6:15 PM
Hi Mark, Funk-To-Funk protocol is 1 data bit(optional), 8 stop bits, odd parody, semi-detatched duplex.<g> KeithF
#3463From: Don FunkOct 16, 1991 6:26 PM
Hi Mark, I would change the data bit to "zero"<g>. Don
#3462From: Don FunkOct 16, 1991 6:26 PM
Hi Keith, Thanks for the bug. I couldn't duplicate it until I entered the Print "Hello" statement. I will add this to the bug report. Don Funk