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

Domkit: Rebuilding dynamic components #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trethaller
Copy link
Contributor

No description provided.

Copy link

@rcstuber rcstuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the code looks like it only looks for the uiInitFunction in the super classes. Doing it like this still throws an "Missing initComponent()" error in the class constructor for me. See: https://github.com/HeapsIO/domkit/blob/1333393c1a0e079542ef70808cd8b9e1b4d9c167/domkit/Macros.hx#L437

@trethaller
Copy link
Contributor Author

@rcstuber you're right! this is actually a bug. Usually we define a base class for all domkit components which actually has @:uiNoComponent and does not call initComponent(), so this hasn't been a problem for us, but thanks for pin-pointing the problem, I've filed a ticket HeapsIO/domkit#25

@rcstuber
Copy link

The issue with this seems that if the markup needs variables passed to the constructor then the function defined through uiInitFunction needs those too, but it gets implemented as an overridden method, so the method signature may vary from one sub-component to the other which won't compile. Am I missing something maybe?

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

Successfully merging this pull request may close these issues.

2 participants