08-05-2011 10:47 AM
Hello,
While preparing for the CLAD exam, I don't seem to agree with the given answer:
What mechanical action of a Boolean would you use to mimic a button on a Windows dialog?
The given answer is "Switch When Released".
Maybe it depends on which button, but when I think about a typical Cancel or OK button, the action happens after releasing, so I would think it is "Latch When Released".
Am I alone in this opinion?
Stijn
08-05-2011 10:55 AM
I think I'd agree with you there.
The when released part in both answers is accurate. That is the behavior that it doesn't take effect until you let go. If you've ever noticed, you can press, hold, drag the mouse off the button then let go, it is like the click never happened.
The difference between latch and switch is that latch causes the button to automatically pop back to its original state once it is read in the program. Switch does not change back. All windows dialogs I've seen appear to pop back once you are done pressing them.
08-05-2011 12:35 PM
I agree with both of you, the correct behavior is Latch When Released.
Where are you seeing this practice exam?
Brian Spears
08-07-2011 05:00 AM
08-07-2011 01:20 PM
It's kind of a trciky question and it depends on the programmer. I think I understand why it could be argued to be switched when released.
Typically, when you press a button on a dialog box, the button stays pressed until the appropriate action completes. For example, if you hit an Apply button, the dialog box completes all actions associated with the Apply button, then resets the button to the off state.
Depending on how you write your program, you can have the same behavior accomplished with a latch button as well. You just have to read the control until after you have finished your actions. In some cases, it may be quite simple, but in others, it may be more difficult if you go through several states before the action is complete. But, it is possible to get the same behavior out of both.
I think a lot of us have been programmed that locals are bad, so manually resetting the switch is bad. It doesn't help that NI also has the buttons on the control pallette setup to latch when released either. You would think that if switched when released is the correct answer, that NI would have their OK and Cancle buttons behave in that manner.
08-07-2011 01:31 PM
I would have to agreen with you and the behavior of most Window buttons. I got this question "right" on my CLAD exam, but only because I new the answer from the practice exam, not that I agree with it. Perhaps some of the NI App Engineers can chime in with a better explanation as to why this is so.
08-07-2011 01:31 PM - edited 08-07-2011 01:35 PM
I would have to agreen with you and the behavior of most Window buttons. I got this question "right" on my CLAD exam, but only because I new the answer from the practice exam, not that I agree with it. Perhaps some of the NI App Engineers can chime in with a better explanation as to why this is so.
Edit: I'm not sure what happened. My post got posted twice. Sorry, I don't know if there is a way to delete posts or not.
08-09-2011 11:27 AM
That question is even trickier for someone who does not use Windows!
This has been pointed out to the people who develop the exams, so they are aware of the problems associated with that question.
Lynn
02-27-2019 03:26 PM
CLAD Sample Exam-2b.pdf file: question 31
sample_clad_exam.pdf: question: 17
What's the right answer?
02-27-2019 03:50 PM
You do realize the PDFs you posted have the solutions at the end?