300-920 · Question #6
300-920 Question #6: Real Exam Question with Answer & Explanation
The correct answer is B. Set x.Type to `pressed' instead of `released'.. Option B is correct because Cisco xAPI split button widgets emit two sequential events - pressed (when the button is activated with its selected value) and released (when the physical press ends, which may carry no meaningful widget value). When the code listens for released, the
Question
Exhibit
Options
- AChange xapi.event to xapi.httpfeedback.
- BSet x.Type to
pressed' instead ofreleased'. - CSet x.Type to
clicked' instead ofreleased'. - DPass x.Value instead of x to the lights function.
Explanation
Option B is correct because Cisco xAPI split button widgets emit two sequential events - pressed (when the button is activated with its selected value) and released (when the physical press ends, which may carry no meaningful widget value). When the code listens for released, the lights function receives an empty or null value, which the lighting system interprets as "off," regardless of which option the user selected.
Why the others are wrong:
- A -
xapi.httpfeedbackis an unrelated mechanism for registering HTTP callbacks; the bug is in which event phase is handled, not the feedback channel used. - C -
clickedis not a valid xAPI widget event type for Touch 10; onlypressedandreleasedexist, so this would break event detection entirely. - D - Passing
x.Valueinstead ofxchanges what the lights function receives, not when the event fires; the real problem is thatreleaseddelivers no valid selection state, so fixing the argument without fixing the event type still yields the wrong value.
Memory tip: Think "Press to Select" - for Cisco xAPI split buttons, the selection value lives on the pressed event. Released is the finger coming off the button, after the value is gone.
Topics
Community Discussion
No community discussion yet for this question.
