Welcome! Log In Create A New Profile

Advanced

WD11 Subscripted control in looper

Posted by Piet van Zanten 
Piet van Zanten
WD11 Subscripted control in looper
April 11, 2008 10:07AM
Hi Forum,

I'm trying to adress a subscripted control in a looper, but I get the runtime error:
"[ ] operator not supported by control."
This gives a runtime error:
looper1.edt_SomeEdit[j]=Myfile.MyField[j]

I can use the subscripted control if I omit the looper prefix.
edt_SomeEdit[j]=Myfile.MyField[j]

I also tried a non subscripted control like Edt_SomeEdit_1, Edt_SomeEdit_2 etc and use indirection. In this case I used:
looper1.{"Edt_SomeEdit_"+j,indControl}
this gives a syntax error on the first bracket: syntax error on {

Any suggestions?

Best regards,
Piet
Piet van Zanten
Re: WD11 Subscripted control in looper: SOLVED
April 11, 2008 10:23AM
Found it! It's just like a table:
edt_SomeEdit[j]=Myfile.MyField[j]

Regards,
Piet
Arie
Re: WD11 Subscripted control in looper
April 11, 2008 10:28AM
Piet,

You can add a looper-attribute (say ATT_CustomerName) and assign that attribute to your edit-control. Can all be done in the looper-description-window.
Then you can use Looper1.ATT_CustomerName[j] in code, to assign you value. And de looper handles propagation to the edit-control.

Arie
Piet van Zanten
Re: WD11 Subscripted control in looper: NOT SOLVED
April 11, 2008 11:43AM
Sorry, this solution does'nt work, the looper subscript is ignored
Piet van Zanten
Re: WD11 Subscripted control in looper
April 11, 2008 11:46AM
Hi Arie,

Unfourtunately each subscript of the editfield in the attribute list is mentioned separately, so there's no way to address the editfield as an array.
I'll contact PCsoft. For now I'll make separate lines of code for each editfield.

Best regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: