• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

For loop question (looking at this tooooo long)

 
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic