0

Problem with PageIndicator

I have a Grid and PageIndicator attached to it. I want to get the PageIndicator to advance and try calling:

indicator.shiftSource("right");

but the console tells me shiftSource is not a function. How do I get the PageIndicator to advance via a function?

4 Replies
  • QUOTE (Metablocks (Social Media) @ May 2 2009, 08:32 AM) <{POST_SNAPBACK}>
    I have a Grid and PageIndicator attached to it. I want to get the PageIndicator to advance and try calling:

    indicator.shiftSource("right");

    but the console tells me shiftSource is not a function. How do I get the PageIndicator to advance via a function?


    There are multiple approaches to this:

    1.) If you are simply wanting a quick test to simulate normal interaction behavior and the indicator is focused on screen (if not, do "indicator.focus()"), then doing a "/key right" will send a key as if it was typed on a keyboard or via a remote.

    2.) If you are really wanting to shift the grid programmatically, you shouldn't be doing it via the indicator. grid.shift('right'); is the more correct method.

    You could do it a number of other ways, but those two jump out as the most relevant.
    0
  • QUOTE (Jeremy Johnstone @ May 4 2009, 10:37 AM) <{POST_SNAPBACK}>
    There are multiple approaches to this:

    1.) If you are simply wanting a quick test to simulate normal interaction behavior and the indicator is focused on screen (if not, do "indicator.focus()"), then doing a "/key right" will send a key as if it was typed on a keyboard or via a remote.

    2.) If you are really wanting to shift the grid programmatically, you shouldn't be doing it via the indicator. grid.shift('right'); is the more correct method.

    You could do it a number of other ways, but those two jump out as the most relevant.


    Thanks this helps. When using the shift approaches...it stops (incrementing) onces it reaches the end..what do you suggest as far as sensing it has reached the end and restarting the process (I am assuming once you reach the end..you do a grid.shift('first')..right?)
    0
  • QUOTE (Metablocks (Social Media) @ May 20 2009, 01:13 PM) <{POST_SNAPBACK}>
    Thanks this helps. When using the shift approaches...it stops (incrementing) onces it reaches the end..what do you suggest as far as sensing it has reached the end and restarting the process (I am assuming once you reach the end..you do a grid.shift('first')..right?)


    Can I ask what you are trying to implement? Are you making an auto rotating grid? If you want the grid to wrap around in general, pass carousel: true in the grid config.

    -Jeremy
    0
  • this did the trick
    0

Recent Posts

in General - Yahoo! TV Widgets