Skip navigation
Currently Being Moderated

Change to Array not preserved.

Jan 3, 2011 9:57 AM

Hi.

 

I'm working on a fairly complex program in which I am manipulating arrays in several ways including, changing the position of elements in the array, adding items to the array and deleteing items from the array.

 

I am tracing the array after each manipulation to see if the correct values are reported and noticed a weird problem.

 

When adding to the array (which is triggered by a drag and drop) I get the correct initial value and the correct value after the value is added, in other words I see the new value in the array in the correct position.  For example "C042.jpg" is the value added and that is what is traced.

 

after rebuild and showArray = C001.jpg,C042.jpg,C002.jpg, . . .

 

However, when I trace the array from another function, the added element no longer appears.  So for example if I check the array prior to deleting, I get the following:

 

prior to delete and show array = C001.jpg,C002.jpg,C003.jpg, . . .

 

The array has reverted to it's initial state.

 

I'd appreciate any Ideas you may have.

 

Best regards,

 

 

 

Chris McLaughlin

 
Replies
  • rtalton
    1,133 posts
    Oct 28, 2008
    Currently Being Moderated
    Jan 3, 2011 10:11 AM   in reply to Chris McLaughlin

    sorry, wrong forum! post removed!   

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 3, 2011 10:44 AM   in reply to Chris McLaughlin

    If you can show a complete coded example that demos your problem it will be easier to help.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points