question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inventory API is confusing when a window is open

See original GitHub issue

The rules for when you can and cannot use bot.inventory while another window is open are confusing and undocumented. This is very not obvious and error prone. Make it so that accessing inventory ‘just works’ even while interacting with other open windows.

Issue Analytics

  • State:open
  • Created 11 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
TheDudeFromCIcommented, Oct 19, 2020

It would be easy to fix that by adding a wrapper for the inventory. If a window is open, it would read/write to that window. If the window is closed, it would read/write to bot.inventory.

Just make the editing of bot.inventory directly would be depreciated.

0reactions
u9gcommented, Feb 28, 2021

Thinking about the process further, it might also be possible to convert the existing API to getters and settings without breaking anything.

For example, rename bot.inventory.slots to bot.inventory._slots and then create a custom getter and setter function for bot.inventory.slots that would return _slots when not in a window, and would return the respective section of the currentWindow’s inventory slots if a window is open.

This would not break any existing API but should fix some of the issues.

This would be done to all of the inventory API, of course. Not just slots.

Is this still the ideal idea?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting problems with Systems Manager Inventory
This topic includes information about how to troubleshoot common errors or problems with AWS Systems Manager Inventory. If you're having trouble viewing ...
Read more >
Window.open() - Web APIs | MDN
Forcing the opening to happen in a specific way, using window. open() , will confuse them and disregard their habits.
Read more >
The HW/SW Inventory - The official Checkmk User Guide
Do not confuse this with the Hardware/Software-Inventory (Linux, Windows, Solaris, AIX) rule set which is for the agent plug-in, ...
Read more >
Tesla window is open and how to reset it
These windows are found on a number of Tesla models. If the car gets confused or loses track of the window position, then...
Read more >
Qualys Global IT Asset Inventory API User Guide
This tool is supported on many systems, including Windows, Unix, Linux and. Mac. In this document Curl is used in the examples to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found