Comments (2)
Since there is no removeItems method, I've been looping over the items array and removing each one with removeItem, for some reason, looping forward removes only every second item! but, looping in reverse from the last one works fine, for instance...
Because every time you remove and item by index, it gets spliced out, so the items.length changes. If you want to remove all items, you could do list.setItems([])
.
I'm okay with a removeItems method. That sounds like a decent idea.
from blessed.
Ah, I didn't think it was a real array (since there was no removeItems
mothod I assumed removeItem was abstracted to prevent the exact problem I
described). Anyway, setItems([]) would kill everything which only addresses
that use case.
On Wednesday, February 26, 2014, Christopher Jeffrey <
[email protected]> wrote:
Since there is no removeItems method, I've been looping over the items
array and removing each one with removeItem, for some reason, looping
forward removes only every second item! but, looping in reverse from the
last one works fine, for instance...Because every time you remove and item by index, it gets spliced out, so
the items.length changes. If you want to remove all items, you could do
list.setItems([]).I'm okay with a removeItems method. That sounds like a decent idea.
Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-36176833
.
Paolo Fragomeni
Founder, Here is How
http://hereishow.to
github.com/hij1nx
twitter.com/hij1nx
from blessed.
Related Issues (20)
- Terminal.app now does support mouse events
- Can't use mouse to focus more than one textbox HOT 5
- screen.focusNext() focusing detached/destroyed nodes
- Cursor
- Support for Moebius .utf8ans images/sprites
- On Scroll it Prints Characters HOT 1
- Windows Command Line cannot display some fg colors
- is there a way to find out if there is an element underneath the mouse
- [docs]: Wrap all sections in `details` tags
- box cannot be aligned to any location
- Archive project? HOT 17
- Emojis break boxes [bug] HOT 7
- Mouse events not detected in windows HOT 2
- deno support? HOT 5
- How to set box exact height and width? HOT 1
- Overlay Image Disappears when Input focused
- text align
- How do you update the style of an existing element?
- get current screen text
- Doubling of characters on Textbox HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blessed.