Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setEnabled (false) doesn't work

 
Matthew Helling
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
folks
I've got a problem and I'm stumped. I have 2 snippets of code (they are checkboxes) and when checked, should disable another checkbox.
The problem is, only one of them works. I've looked at the code a hundred times and can't figure it out.
Also, in a perfect world unchecking the box would "un-gray" the other option. That doesn't work, but I was able to add code to the reset button which will enable all checkboxes.
Please take a look and offer any advice you can.
 
Matthew Helling
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, I found the bug, this is really weird.
Because in my server declarations I never had Email Server = false, the code wouldn't run for checking the box. once i set one of the server objects to false, it started working.
goofy. hope someone learns something.
I could still use some help un-graying boxes if anyone has any ideas. When I uncheck the box, it "Undos" the other effects, but not the setEnabled (false).

matt
[ March 24, 2004: Message edited by: Matthew Helling ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of using setEnabled( false ), you could base the boolean value off whether the current checkbox is checked. After you're finished with all the tests, have something like this -


[ March 25, 2004: Message edited by: Nathan Pruett ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic