Menu

#27 Database error - additional info fields - add/delete

v2.41
closed-fixed
Bro
8
2007-01-09
2006-11-12
Bro
No

ArrayIndexOutOfBoundsException occurs after adding and
deleting a new additional info field before saving.
New movies can not be added, or existing be edited.

Can be "fixed" by clearing the value in the
"Settings"."Active Additional Info Field" column in
the database.

Discussion

  • arrhenius

    arrhenius - 2006-11-13

    Logged In: YES
    user_id=1642919

    Hi :

    I think i solved this one, when you remove an item ,it is
    removed from the array _toRemove, but it is not removed from
    the DefaultListModel, we have to add a line to remove it and
    its done, this is the fixed executeCommandRemove() :

    P.D : ive never "worked" in a sourceforge project, so i dont
    know what i must do, i mean, its ok to post the fix here?
    maybe you have fixed it? how can i know if someone is
    working in a bug or in a feature request?

    private void executeCommandRemove() {

    int selectedIndex = getActiveFields\(\).getSelectedIndex\(\);
    /\* If any field is selected.. \*/
    if \(selectedIndex \!= -1\) \{
        /\* Gets the field to remove... \*/
        String field =
    

    (String)((DefaultListModel)getActiveFields().getModel()).getElementAt(selectedIndex);
    /* Removes the field from the add list... */
    if(_toAdd.contains(field)) {
    _toAdd.remove(field);

    ((DefaultListModel)getActiveFields().getModel()).remove(selectedIndex);/*LINE
    ADDED*/
    }

        /\* Adds the field to the remove list if it exists in
    

    the original... */
    if(!_toRemove.contains(field) &&
    _originalExtraList.contains(field)) {
    _toRemove.add(field);

        /\* Removes the field from the active fields list \*/
    

    ((DefaultListModel)getActiveFields().getModel()).remove(selectedIndex);

        if \(selectedIndex ==
    

    ((DefaultListModel)getActiveFields().getModel()).size())
    getActiveFields().setSelectedIndex(--selectedIndex);
    else
    getActiveFields().setSelectedIndex(selectedIndex);

        getActiveFields\(\).ensureIndexIsVisible\(selectedIndex\);
        \}
    \}
    

    }

     
  • Bro

    Bro - 2006-11-19

    Logged In: YES
    user_id=840074
    Originator: YES

    Hi

    Sorry I didn't reply but the email notice was sent to the spam folder...darn.

    This bug is fixed in CVS.

    Bro

     
  • Bro

    Bro - 2006-11-19
    • assigned_to: nobody --> bro3
    • status: open --> open-fixed
     
  • Bro

    Bro - 2007-01-09
    • status: open-fixed --> closed-fixed
     
  • Matthias Ihmig

    Matthias Ihmig - 2007-05-01

    Logged In: YES
    user_id=921651
    Originator: NO

    Has been worked over in 2.5.2 and should now be fixed. Please test extensively :-)

    Matthias

     
Auth0 Logo