Skip to content
New issue

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

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

Already on GitHub? # to your account

Attempt even more hands-off reflection to set effect properties #2

Open
MondayHopscotch opened this issue Dec 20, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@MondayHopscotch
Copy link
Member

We currently specify a field name and a property setter function for fields we want to expose to the user.

It may be possible to abstract this slightly further and just use reflection to determine which fields are on a given Effect object (already can do this with something like Reflect.fields()). The hard part is determining the Type of the field so we can automagically associate the right PropSetterFunc with it.

Pros: Even less for the user to mess up
Cons: Would still need a way to let users provide their own setters if they want to do something with the values (.... this may not be true as the user can just do the transformation at apply() time.

@MondayHopscotch MondayHopscotch added the enhancement New feature or request label Jan 11, 2021
@MondayHopscotch
Copy link
Member Author

Can we somehow utilize macros or typedefs? As this is input through raw strings, it may be hard to do through raw use of the library. It might make more sense to have this repo have an editor that lets you build strings. Though we'd have to figure out a way to import effects from other projects... Perhaps have a place to drop code that this will auto-register for use in the editor?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant