Coder Social home page Coder Social logo

StopApplication about asciimatics HOT 3 CLOSED

peterbrittain avatar peterbrittain commented on July 23, 2024
StopApplication

from asciimatics.

Comments (3)

peterbrittain avatar peterbrittain commented on July 23, 2024

Can I just check what you're trying to do...

If I understand correctly, you have a set of Scenes that you want to play through once from start to finish and then exit Screen.play() without repeating them. Is that right? If so, all you need to do is raise StopApplication() at the required time (frame) in your last Scene.

Ah, but there is no easy way to do that... Right now, you would have to do that from inside one of your Effects.

I could add a repeat parameter to play(), which would determine if it loops after the last Scene is over. Or I could add an API to Scene to allow you to add custom logic to any frame update (and so allow you to raise StopApplication at any point you like as a Scene progreses).

Would either of those be helpful?

from asciimatics.

 avatar commented on July 23, 2024

In my case i think the repeat param would be awesome ^^)
Anyway I use to append some "string" in the list at the end to catch an error and then continue with my script but thnks for the answer now i understand where to look at :)

Great work by the way !

from asciimatics.

peterbrittain avatar peterbrittain commented on July 23, 2024

Thanks! I've now added a simple repeat flag to play (see 328d957). This will be available from V1.7.

from asciimatics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.