• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Strangeness afoot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strangeness afoot


  • Subject: Strangeness afoot
  • From: Kevin Windham <email@hidden>
  • Date: Thu, 25 Oct 2007 18:35:44 -0500

After finally figuring out my goofy mistake earlier I made some progress. I have a functioning solution now, but I am puzzled by some strange behavior I am seeing although I am sure there is a perfectly reasonable explanation for it. I just can't see it.

I have the following method that creates a name for a checkbox. 

tableIndex is bound to the repetition of the table row that contains the checkboxes.
lastTableIndex is a variable I use to help keep track of when the column index needs to be reset
colIndex is the column index that I am using for naming purposes.

public String cbName()
{
if (tableIndex!=lastTableIndex) {
colIndex = 1;
}
lastTableIndex = tableIndex;
String cbName = "r" + tableIndex + "c" + colIndex;
colIndex++;
return cbName;
}

The results of this method turn out to be: 

<tr>
          <td width="175" align="left" class="black10" style="padding:3px 0px 3px 2px;">Dog 1</td>
          <td align="center"></td>
          <td align="center"><input type="checkbox"  name="r0c1" value="0.37.10.18.0.5.0"></td>
          <td align="center"><input type="checkbox"  name="r0c3" value="0.37.10.18.0.7.0">&nbsp;</td>
          <td align="center"><input type="checkbox"  name="r0c5" value="0.37.10.18.0.9.0"></td>
          <td align="center"></td>
        </tr><tr>
          <td width="175" align="left" class="black10" style="padding:3px 0px 3px 2px;">Dog 2</td>
          <td align="center"></td>
          <td align="center"><input type="checkbox"  name="r1c1" value="0.37.10.18.1.5.0"></td>
          <td align="center"><input type="checkbox"  name="r1c3" value="0.37.10.18.1.7.0">&nbsp;</td>
          <td align="center"><input type="checkbox"  name="r1c5" value="0.37.10.18.1.9.0"></td>
          <td align="center"></td>
 </tr>

Notice how the columns count by two? Anyone have any idea why that might be?

Thanks,
Kevin
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Strangeness afoot
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: [Announce] WebObjects Community Steering Committee
  • Next by Date: Re: Many-to-many question ...
  • Previous by thread: Re: [Announce] WebObjects Community Steering Committee
  • Next by thread: Re: Strangeness afoot
  • Index(es):
    • Date
    • Thread