We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Dear Processing forum,
My name is Anton Cujec. I'm a 12th grader at High Tech High Media Arts, a project based high school. In my digital arts class, we are using processing to create a project that will reflect research we've collected on an unfamiliar landscape. I have chosen the unfamiliar landscape of the drought in California. One of the main parts of my project is a survey that asks questions that will allow me to calculate about how much water they use every day. One small but key part of my project is creating the answer choices for each question. I am currently trying to make it so that when you click on an answer choice, that specific choice will change from a white box with black text, to a black box with white text. The issue is that when I click on an answer choice, the color inverts for all of my answer choices. I am currently using a class to set up my answer choices, as I will have over 70 and am looking for an efficient way to get this to work. My code can be found here!
If you have any other suggestions, please let me know!
Thanks in advance. :)
Answers
I was unable to download the code. I clicked on the blue zip file link, then on the next page I clicked on Download and I got the error 415 message i.e.
The requested URL was not found on this server.
Thank you for taking a look! I really appreciate it.
I'm sorry the link isn't working. I tried it and got the same thing. I'm working on getting it onto dropbox now.
Sorry it took so long. After trying three different websites, I finally had success getting it on dropbox. The link to it is here. Let me know if there are any more problems. Thanks again for the help!
download works now
I gather that when you press another button in the same line of buttons, the first is off again and the latter is highlighted
how is that reflected in your code...?
At this point, it's not. We're having trouble getting them to turn on individually right now. The line of code that is in charge of changing the colors is on the page titled "Objects" in the class labeled "Answers". Also, I didn't know that accepting an answer would mark the discussion as "answered". Is there a way to undo that?
Thanks.
please write a personal message to philho to undo it
Actually, the Vanilla plugin managing the Answered state of topics is badly made: not only it nags users for a choice, but it allows nobody, not even moderators / administrators, to remove an "answered" state.
oups....
briefly, your code is to complex too debug it quickly
you have one object Answer.
That is wrong, because one answer represents one line of check-boxes
therefore I suggest have an array of Answer, one Answer for each line
when you have different pages, have on page 1 e.g. answer 1 and 2, on page 2 answer 3, 4, and 5 and so on ....
also within class Answer:
you have 10 checkboxes so you need to mouse check 10 times (or in a for-loop) but not only once
and what's this...
experiment
Some online clickable grids:
another test...........
Thank you all so much for your help! I'm working now to work these examples into my code. I'll post if I have any follow up questions. Again, thank you all. The help is really appreciated!