I  asked this over on the Users page, but got no answer.  So: In a panel, I want to use the Reached Event in a Stop…

I  asked this over on the Users page, but got no answer.  So: In a panel, I want to use the Reached Event in a Stop Point to show a specific screen. What variables should I set? Thanks so much!

]]>

13 Commentsto I  asked this over on the Users page, but got no answer.  So: In a panel, I want to use the Reached Event in a Stop…

  1. Anonymous says:

    < ![CDATA[

    Chris Chastain answered here: https://plus.google.com/u/0/+ChrisChastainCC/posts/apS1pVAwaW5


    Use a bookmark. Or a script, for instance:


    LL.getEvent().getContainer().setPosition(some_x, some_y);

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Nice to see that replies are possible now.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Thanks for your help, guys. I ended up using  setPositions(). But I added a step. First , more context: In my panel, I have three screens arranged horizontally. If it is showing the last screen and I swipe from right to left, I want to go back to first screen. If I use a single setPosition() to go to the first screen, either it jumps, or “rewinds”, depending on if I have animation off or on. “Rewind” meaning the animation scrolls left to right through all the screens, back to the first screen. Neither is exactly what I want. So I use two setPosition()’s. The first jumps to the empty space before the first screen, i.e. screen -1, with anim off. Then the second moves from there to the first screen with anim on. The effect is to transition from the last screen back to the first, but with a right to left animation. It is as if another first screen were to the right of the last screen, moving left. Does that make sense?

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Turn on seamless if that’s all you want

    ]]>

  5. Anonymous says:

    < ![CDATA[

    I realized that’s seamless is about half way into this and gave it a try. It seemed to jump or scroll super fast when wrapping. The other thing is by modifying these scripts, I can make this vertical layout scroll as if they were stacked horizontally, with up and down swipes. I know there is vertical seamless. Does that do anything if the screens are strictly horizontal? My method is not without drawbacks. It sometimes gets “stuck” on a blank screen, or shows screen two when it should show screen one, if I do a short or fast swipe. I think that because of the expense of the API calls. There may be no way around that.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Chris Chastain


    On the other post, you mentioned setting a bookmark and then triggering it. How would I trigger a bookmark? I used your script tool to make goto-bookmark script, but it uses the setPosition API. When i tap a bookmark on the screen does it use setPosition() too?  I’m wondering if using a bookmark would be less expensive than calling setPosition() in a script.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    tjgriffin not my script, but I don’t know if using a bookmark would be less expensive or not. Maybe Pierre Hébert​ can answer, but I doubt there would be enough difference to matter.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Of course! It was Triangulo Y’s script tool. I think you’re right about bookmarks. And how do I trigger a bookmark, other than tapping it? Thanks!

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Like you originally wanted, in the stop point.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Using the Reached Event? I don’t see anything to trigger a bookmark. I must be missing something…

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Indeed, bookmarks and setPosition API are both executed the same way, the overhead difference between the two is not significant. Use the most suitable one according to your needs. It is possible to set a Lightning Action “Go to specified desktop&position” as the action for the reached event but you can’t select an existing bookmark (yes, I know, this is a long requested feature…). That said a bookmark is just an Intent, and it can be easily tweaked (you can modify the bookmark target position by modifying the intent). Another option is to run a script like this:


    LL.getEvent().getContainer().getItemByName(‘your_bookmark_name’).launch();


    (assuming the bookmark item is in LL.getEvent().getContainer())

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Got it! I see I have more studying to do 🙂   I’ll give Desktop&Position a try, and the launch() API. I’ll read up on Intents. What does Launch Item actually launch? I expected to be able to specify which item to launch.



    I’m quickly realizing that Lightning isn’t really a launcher. It’s more of a framework for developing a launcher, with carefully selected defaults to make most usable if the doesn’t set anything. Just like WatchMaker isn’t a watch face. Phenomenal! Thanks Pierre.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Launch does an action which is roughly equivalent to item tap, it may starts an app, or open a folder, depending on item type.



    I confirm that LL is still a launcher, you are still able to long tap and add an app quite easily 🙂

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *