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

Better interface for options #29

Open
Craftplacer opened this issue Nov 7, 2024 · 1 comment
Open

Better interface for options #29

Craftplacer opened this issue Nov 7, 2024 · 1 comment

Comments

@Craftplacer
Copy link
Collaborator

Craftplacer commented Nov 7, 2024

sane.dart should provide easy access to well known options, and make it natural to access options.

Goals:

  • Use subscript access for option number / name, getting and setting (null as value for auto config?)

Non goals:

  • Interpreting and managing not well-known options (out of scope)

Concept:

device.options.scanArea.x = 20;
device.options['source'] = 'Flatbed whatever';
@Jupi007
Copy link
Collaborator

Jupi007 commented Nov 7, 2024

Also, I really don't like the current _controlOption() implementation...
We could replace the generic control options with getOption<T>(), setOption<T>(), setAutoOption<T>(), controlButtonOption().
The biggest problem is working with value type...

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

2 participants