• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

For loop question (looking at this tooooo long)

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the following for loop I am overwriting the String[] paramValues variable each time I am going throw this for loop. Can someone please point out or give me some direction on what I'm doing wrong? I've been looking at this too long and would appreciate another set of eyes.

Regards. Here is my code:

 
Grant Gainey
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So what index of paramValues are setting on each loop iteration?

Grant
(edited to remove bogus end-tag)

[ December 06, 2005: Message edited by: Grant Gainey ]
[ December 06, 2005: Message edited by: Grant Gainey ]
 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Grant,

Thanks for the reply. If I understand your question correctly, the index of paramValues is being set to the ParamNames.length, I think. Since String[] ParamValues = new String[ParmNames.length] is set before the loop.

Is that my problem?
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there one String value per parameter name? If so, then what you want is this:

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg,

Thanks so much for your reply. I did try that. My problem is that the WebLink link = response.getLinkWithID("ViewLink");

The line of code

paramValues[i] = link.getParameterValues(paramNames[i]);

gives me a MIXMATCH error:
Type mismatch: cannot convert from String[] to String

The getParameterValues method is from the JWebUnit product that I am using to grab the values of both the parameters.

There in lies my problem. I just think I resolved my problem. Thank you both for all the help.

Thanks.
[ December 06, 2005: Message edited by: Melinda Savoy ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic