Code Monkey home page Code Monkey logo

Comments (5)

cronvel avatar cronvel commented on August 20, 2024

@davidgatti If you run the script located in sample/progress-bar-doc1.js, do you get it?

It should works, however I need more information to figure out what happened (your terminal and your code).

from terminal-kit.

davidgatti avatar davidgatti commented on August 20, 2024

OK, sure, your code (2nd example) have a nice Done in bright white in the end. Shown in the screenshot bellow:

screen shot 2017-08-24 at 4 44 59 pm

I of course modified your example to fit my needs, and now I wonder... did I removed a crucial part? Because I can't see or figure out what is missing, thus my curiosity what triggers this Done.

The project that I'm working on is public so you can check it out here.

  • Line 5: I set the variable
  • Line 179: I prepare the progress bar with the right size, after I know the size :)
  • Line 237: I start the progress bar
  • Line 306: I tell the progress bar when it is done with the current element.

So my thinking here, is that after the items count goes to 0 you show the Done. But it seams that I must do something more to make it happen. This is of course not the end of the world, but it be nice to have it if possible.

from terminal-kit.

cronvel avatar cronvel commented on August 20, 2024

@davidgatti Hmm, that's strange, I can't see why it wouldn't works... Is there any process.exit() somewhere that can quit before it actually print 'Done'?

from terminal-kit.

cronvel avatar cronvel commented on August 20, 2024

@davidgatti Ah ok, I found it: you haven't turned on the eta option. In fact done is written on the eta area of the progressBar, and since you turned it off, it cannot be displayed.

Line 180, add eta: true ,.

BTW: very nice coding style, I liked it! ;)

from terminal-kit.

davidgatti avatar davidgatti commented on August 20, 2024

O thank you! And actually both suggestions need to be done:

  • add eta
  • and add a small delay.

Then it all works :)

I'm glad you liked the style :) I'm doing my best to make it nicer for other to follow :)

from terminal-kit.

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.