Results 1 to 2 of 2

Thread: bug in DwtListView.prototype.getColIndexForId

  1. #1
    zeebra is offline New Member
    Join Date
    Oct 2005
    Posts
    4
    Rep Power
    9

    Default bug in DwtListView.prototype.getColIndexForId

    Bug in :

    ************************************************** *
    // this returns the index into the header list array for the given Id
    DwtListView.prototype.getColIndexForId =
    function(headerId) {
    if (this._headerList) {
    for (var i = 0; i < this._headerList.length; i++) {
    if (this._headerList[i]._id.indexOf(headerId) != -1)
    return i;
    }
    }
    return -1;
    };
    ************************************************** *

    this method returns incorrect column index.

    Steps to simulate the problem:
    1. create an instance of DwtListView with 4 column headers with column IDs 100, 500, 1, 11
    2. invoke getColIndexForId(1) with argument 1. This method's incorrectly returns 0 as the column index.

    The real problem is in the follow line :
    if (this._headerList[i]._id.indexOf(headerId) != -1)


    --Zeebra

  2. #2
    pshah is offline Zimbra Employee
    Join Date
    Sep 2005
    Location
    Sunnyvale, CA
    Posts
    269
    Rep Power
    9

    Default

    Good catch!

    The reason this bug hasnt shown up in our use of DwtListView is b/c the ID's we use dont start w/ numbers, but unique letters. Regardless, it should be fixed to deal w/ any unique ID.

    In the meantime, I would suggest changing your ID's to be more unique until a future release gets the fix. Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Backups fail after workaround for bug 10827
    By warbirdcharles in forum Administrators
    Replies: 1
    Last Post: 07-17-2007, 12:07 PM
  2. Bug Question all aliases GAL
    By fred3us in forum Administrators
    Replies: 1
    Last Post: 03-12-2007, 09:39 AM
  3. will be the accent char bug fixed anytime soon?
    By lfarkas in forum Developers
    Replies: 1
    Last Post: 05-15-2006, 03:19 AM
  4. serious IMAP download bug (6326)
    By ericding in forum Developers
    Replies: 5
    Last Post: 04-05-2006, 10:34 AM
  5. i18n, bug 5912 and other considerations
    By Kafka in forum I18N/L10N - Translations
    Replies: 9
    Last Post: 02-22-2006, 04:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •