Closed soimon closed 1 year ago
Thanks for the PR @soimon. This is a good feature to add. The issue that I'm having is that the following code, always returns an undefined path. I couldn't find a working example for it:
const tracks = await live.song.children('tracks');
const track = tracks[0];
console.log(track.path);
Thanks for your quick response! Have you updated the amdx? I'm not sure how to cleanly update and commit the actual plugin, so I've only pushed the unfrozen live-api.js
. When using my local copy this is the result:
const tracks = await live.song.children('tracks');
const track = tracks[0];
console.log(track?.path); // live_set tracks 0
If that's note the case, I might have missed some code when splitting my fork into pull requests. (Haven't been able to find anything though)
This is a good feature to have! As far as I can see, the path is needed to call functions.
This is part of 0.0.10!
Thanks @soimon, I've added directly to the new release your changes based on your code for accessing the path. I've a footnote to the commit referencing your work, hope that's okay with you.
Totally fine! Glad to have it committed.
This PR adds a getter for the canonical path of retrieved objects:
This opens up the possibility to retrieve the index of an object, and query more effectively.
Example
This example uses my first PR #18 for adding a single child getter.