Skip to content

IDs in a front end application #55

Answered by leolabs
soundsmagic asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, Live doesn't offer a stable ID for its objects, but maybe you can use another value to uniquely identify them and keep a map of custom_id -> object which allows you to reference it.

This is how I do it in AbleSet with locators, for example. Each locator has a unique position that I can use as its key to reference it in the web app and to store some additional metadata on the server-side. Of course, when the position of a marker changes, the code has to make sure that the reference stays the same even though its key changed.

If you don't want to invest the time to write this, just using the raw.id property should work as well. Even if the ID of the object changes, you can st…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@soundsmagic
Comment options

Answer selected by soundsmagic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants