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

[bind] Implement bind lookups #1

Closed
jkb0o opened this issue Nov 30, 2022 · 1 comment
Closed

[bind] Implement bind lookups #1

jkb0o opened this issue Nov 30, 2022 · 1 comment

Comments

@jkb0o
Copy link
Owner

jkb0o commented Nov 30, 2022

For now only simple binds are supported:

from!(player, Player:name) >> to!(name, Label:value)

The problem is if I create something like Profile widget which displays player avatar/name/health based on provided Player entity, it would be difficult to handle binds.

The idea is to respect the changeable page.player entity in the single bind like this:

from!(page, Page:player @ Player.name) >> to!(name, Label:value)
from!(page, Page:player @ Health:current) >> to!(bar, Range:value)
from!(page, Page:player @ Health:max) >> to!(bar, Range:maximum)

This is how @ lookup selector is supposed to work:

  • assume that Page.player of the Entity type
  • bind Player.name at Page.entity to name, Label.value (and others)
  • if Page.player changes - clear existed binds from Page.player and rebind them to new Page.player source.
@jkb0o
Copy link
Owner Author

jkb0o commented Sep 25, 2023

This will be done right in polako (#77)

@jkb0o jkb0o closed this as completed Sep 25, 2023
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