Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
hey wiz
Jun 18, 2005

tef posted:

Put an on change in each checkbox - when it is set add one to a total, and when it is unset substract one. The form is valid if the total is greater than one?
If he used an on change event, why not deselect all other check boxes before selecting the current one?

Adbot
ADBOT LOVES YOU

hey wiz
Jun 18, 2005

Plastic Jesus posted:

Because that's really confusing for the user.
Agreed, but using checkboxes and shoddy logic to implement the functionality of radio buttons is in no way less confusing.

hey wiz
Jun 18, 2005

Sounds like you want LinkedList.iterator().next();

hey wiz
Jun 18, 2005

grep/egrep will return the lines what match that regex you specify, not the regex itself. You'll need to redirect the egrep output to sed/awk(gawk) to extract the data from the line you want.

hey wiz
Jun 18, 2005

Femtosecond posted:

Ahh I knew I needed to create the list in some way. I actually had written in
code:
List<Banana> m_Stufflist = new List<Banana>(); 

The problem here is that your List is declared within the scope of the constructor, so after the constructor exits, you won't be able to access that list.

Femtosecond posted:

in the constructor and that didn't work. Changing it to:
code:
m_Stufflist = new List<Banana>(); 

worked since I had already declared m_Stufflist earlier.
That second way shouldn't work either. List (java.util.List) is an interface and unlike classes, interfaces can not be instantiated. Did you write your own List class?

Adbot
ADBOT LOVES YOU

hey wiz
Jun 18, 2005

I didn't see the part where he mentioned C#. I need to stop assuming code that looks like Java is actually Java :).

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply