The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Strange Choice behavior

Last post 08-22-2007, 12:37 AM by mobilewares. 2 replies.
Sort Posts: Previous Next
  •  08-21-2007, 1:55 PM 4368

    Strange Choice behavior

    I am implementing a <UI that is a variation of a spinner.

    I have a Choice variable that contains text strings.   I am using 2 buttons for Previous/Next

    In the <Changed> rule for the button invoke I am calling the NextValue  PreviousValue events for the choice.  I have binded the choice to a text label for display.

    As I advance through the choices it is skipping over some of them.  Almost like the NextValue is getting called twice which just one button press?

    There are 7 elements in the choice and it displays 1,2,4,6,7.   Anyone seen this behavior before that might be able to give me some idea on where to look for the problem?

     

    Jeff

     

  •  08-21-2007, 3:36 PM 4370 in reply to 4368

    Re: Strange Choice behavior

    Put a 'DebugTrace' line in the same rule that Invokes the 'Next' and 'Previous' functions. This will tell you if it is being called more than once.

    Make sure that your button-press rule is a changed rule, based on ClickHandler.Invoked. If you use some other ClickHandler members, they don't always fire as reliably.


    100 downloads a day for Yougle Vista - goin' allright!

    Check out http://www.thedigitallifestyle.com/cs/Blogs/developer/default.aspx and http://www.push-a-button.com.au/products/mce
  •  08-22-2007, 12:37 AM 4380 in reply to 4368

    Re: Strange Choice behavior

    Hi - as IIB mentions there's some quirks with trapping clicks (ie via Clicked/Clicking and use of Condition vs Changed  etc).

    Main thing to watch for is that you aren't catching multiple events for both button down,pressed,repeat, up etc (which can happen if the click isn't handled correctly) - which can cause some unexpected behaviour.

    Niall

     

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems