Giter Site home page Giter Site logo

Comments (4)

JEG2 avatar JEG2 commented on July 18, 2024

I played around with this a little today and you're right that it doesn't work. It looks like HighLine's menu code doesn't support the Array of results. I guess this is a bug.

Still, it's not totally clear to me how this should work. For example, if code sets up blocks to be run for each item, should that happen as the individual item is picked or after all items have been picked?

It's hard for me to imagine how this combination of features would be used. Do you have a more realistic example that could shed more light on this?

from highline.

smackesey avatar smackesey commented on July 18, 2024

It seems much more intuitive to me to run the block item by item.

As for a realistic example, I encountered this issue while trying to use the Highline menu system to filter an error log. I'm building a database from a bunch of CSV files and some of the data is rejected during the build process. This goes into a big JSON file where each entry includes, among other data, the name of the file that generated the error and the type of error. I need to provide subsets of these build errors on demand to coworkers, so I was trying to build a little command line utility that would let me select an arbitrary set of files followed by an arbitrary set of error types, and output the error log after being filtered by these selections. I was originally trying to use the string/regex form of gather to terminate the menu by entering a blank, after selecting all desired options. I can imagine many similar use cases, but perhaps there are better ways to approach such a problem?

from highline.

JEG2 avatar JEG2 commented on July 18, 2024

It seems much more intuitive to me to run the block item by item.

If we're going that route, why not just wrap the choose() call in a simple loop? Then you could even change the list as the select items which seems to lead to a better UI.

from highline.

JEG2 avatar JEG2 commented on July 18, 2024

We are currently planning the next major version of HighLine. We will include a discussion of this issue in the plans we make for that release.

from highline.

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.