Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create button on demand (dynamically create layout) ? #24

Open
linonetwo opened this issue Mar 25, 2020 · 0 comments
Open

How to create button on demand (dynamically create layout) ? #24

linonetwo opened this issue Mar 25, 2020 · 0 comments

Comments

@linonetwo
Copy link

linonetwo commented Mar 25, 2020

I'd like to create a multi-touch bar using button components contains an icon and label like:

<grid ontap="foo_tapped">
	<label id="my_label" text="foo" />
    <button image="img.png" />
</grid>

And I'd like to create such component on new data comes from VSCode extension, which describes the button components to be render:

local s = require("socket").new();
s:ondata(function (data)
	local b = require("buffer").new("utf8");
	b:write(data);
	local button_data = b:readstring() // or something to get the new button list
end);
    
     libs.server.update(xxxx) // how to do so like I can do using document.createElement or ReactDom.render ?

I think I can use libs.server.update but https://github.com/unifiedremote/Docs/blob/master/libs/server#server_update is 404

And in https://github.com/unifiedremote/Docs/blob/master/libs/layout.md#advanced it is said that it can only handle lists or dialogs, can't handle complex component like the one above.

So how can I achieve this?

@linonetwo linonetwo changed the title How to create button on demind? How to create button on demand? Mar 25, 2020
@linonetwo linonetwo changed the title How to create button on demand? How to create button on demand (dynamically create layout) ? Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant