Search:

Type: Posts; User: amgleason83

Search: Search took 0.08 seconds.

  1. Re: how to sort array by object string member value?

    I have figured it out....

    apparently, the problem was with the looping statement that used variable b and what stock[b] was pointing to. I changed the statement to say this...

    ...
  2. Re: how to sort array by object string member value?

    yes, i printed...

    stock[a].getItemName()
    stock[a].itemname
    stock[b].getItemName()
    stock[b.itemname
    temp.getItemName()
    temp.itemname
    compare
  3. Re: how to sort array by object string member value?

    I have printed the values stored in stock[a], stock[b], temp, and compare just to make sure that everything was returning a value, not only did they all return a value, but the correct value as well....
  4. Re: how to sort array by object string member value?

    ok, I changed it up a bit trying to get this right. I am still getting the null value error message though. Please help me understand how I should go about printing those values in the correct spot...
  5. Re: how to sort array by object string member value?

    Ok, so I added this for loop at the beginning of the final else statement to display the output. It should compare the strings from each entry in the array. However, I am getting an error message...
  6. how to sort array by object string member value?

    I am trying to sort the 'stock' array (which is made up of Product objects) by the item name of each Product object. Before I start hacking at my code (which works well right now), I want to know if...
Results 1 to 6 of 6