Results 1 to 3 of 3

Thread: CheckColumnConfig bug please help

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    40
    Vote Rating
    0
      0  

    Default CheckColumnConfig bug please help

    Hi all,

    I have this code

    Code:
    CheckColumnConfig checked = new CheckColumnConfig(ColumnDatabaseName,
                    ColumnName, ColumnSize) {
                @Override
                protected String getCheckState(ModelData model, String property,
                        int rowIndex, int colIndex) {
                    String s = (String) model.get(property).toString();
                    String r = "";
                    if (s == "1") {
                        r = "-on";
                    } else {
                        r = "-disabled";
                    }
                    MessageBox.info(s + " (Length: "+Integer.toString(s.length())+")", r, null);
                    return r;
                }
            };
            return checked;
    }
    Why is my statement "if" shows that the variable "r" is equal to "-disabled" when it is not true as seen in the attached picture?bug.png
    Regards
    Baczek00

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    131
      0  

    Default

    if (s == "1") {
    This will never be true. Try to change it to "1".equals(s)

  3. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    40
    Vote Rating
    0
      0  

    Default

    Thank you,
    You're right.
    Regards
    Baczek00

Tags for this Thread

Posting Permissions

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