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

Property definitions should accept further (type-specific) commands #15

Closed
weirdan opened this issue Jul 26, 2017 · 1 comment
Closed

Comments

@weirdan
Copy link
Contributor

weirdan commented Jul 26, 2017

Documentation is not clear about this quirk, but I think it should be possible to compile this definition:

definition ClassName
title ClassName
property string type
enum ClassName
property int meaningOfLifeTheUniverseAndEverything
enum 42

where enum ClassName defines the only possible value for type property, and enum 42 is the only allowed value for meaningOfLifeTheUniverseAndEverything.

Meanwhile Schema forwards handleCommand to ObjectType and that does not accept subcommands for current property being processed. While it's possible to define fixed value for string properties using property enum(ClassName) type, I don't see any way to define fixed value for integer properties (and other types).

@weirdan
Copy link
Contributor Author

weirdan commented Jul 26, 2017

I don't see any way to define fixed value for integer properties (and other types).

Well, one could do property int[42,42]=42 ..., but that's extremely ugly

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