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

Caster GUI settings window does not launch #327

Closed
LexiconCode opened this issue Nov 21, 2018 · 16 comments
Closed

Caster GUI settings window does not launch #327

LexiconCode opened this issue Nov 21, 2018 · 16 comments
Labels
Bug Unexpected behavior from existing features. Caster Core Spec Issues for Caster Specs that are not part of the application or language specific grammar/ccr

Comments

@LexiconCode
Copy link
Member

LexiconCode commented Nov 21, 2018

Caster has a GUI for settings does not launch. To test use Spec "launch settings window"

ERROR:action.exec:Execution failed: Timeout while waiting for window context: WaitWindow(title='caster settings window v 0.5.11')

@LexiconCode LexiconCode added Bug Unexpected behavior from existing features. Caster Core Spec Issues for Caster Specs that are not part of the application or language specific grammar/ccr labels Nov 21, 2018
@LexiconCode
Copy link
Member Author

LexiconCode commented Nov 21, 2018

Works prior to Add default format and secondary format (#262)

@mrob95
Copy link
Member

mrob95 commented Nov 21, 2018

I'm getting this on my normal branch, which is way behind #262. Increasing the time out didn't fix it.

@LexiconCode
Copy link
Member Author

LexiconCode commented Nov 21, 2018

Try deleting the settings.toml. if you've added any customizations is it may cause the same issue.

@mrob95
Copy link
Member

mrob95 commented Nov 21, 2018

Still getting the same thing in both the master and develop branches

@LexiconCode
Copy link
Member Author

LexiconCode commented Nov 21, 2018

capture

  1. UI works after I deleted Caster and re-cloned.
    Reverted to 7ddf640
    deleted .toml files in data directory
  • UI Works as expected
  1. Reset branch to commit Add default format and secondary format #262
  • UI Fails with the error above.
  1. Reverted to 7ddf640 commit without deleting .toml from data
  • UI Fails with the error above.
  1. Still using 7ddf640 but deleted all .toml files
  • UI Works as expected

Therefore I'm left with the conclusion that UI cannot parse some of the new fields. Hopefully that gives a clear picture of the process I was using to test.

@LexiconCode
Copy link
Member Author

I cant imagine what would be causing it to be different on both of our machines.

@mrob95
Copy link
Member

mrob95 commented Nov 21, 2018

This is what i'm seeing on the master branch. Manually modifying the settings files has fixed it on my main branch though... I am confused.

settings error

@LexiconCode
Copy link
Member Author

LexiconCode commented Nov 21, 2018

Okay I'm not sure what to say but it works on the main branch for me as well. Hmmm it's going to require some thought. In addition a few other people to test would be helpful to see a trend.

@comodoro
Copy link
Contributor

comodoro commented Nov 21, 2018

I can confirm. From inspecting the code it looks like the settings window traverses the settings file for all settings and lists them in the GUI, assuming that all lists contain strings only. I did not know that, all the more reason to move the format definitions outside the settings file where they frankly don't belong. I was thinking about may be introducing a default TOML file for CCR grammars for this purpose( and may be for listing default enabled grammars, like the core ones )

So TL;DR it was introduced by #262 and the solution looks not too difficult, but not right now, I am not too energetic

@LexiconCode
Copy link
Member Author

Yeah it's one of those undocumented features I forgot about over the mists of time. So I think it's a good plan to move it out into its own file. There's really no rush.

Versatilus added a commit to Versatilus/caster that referenced this issue Nov 24, 2018
…ger lists.

This is a simple extension of the existing functionality in order to 
address dictation-toolbox#327. A proper solution would require rewriting much of the 
settings window code.
@Versatilus
Copy link
Collaborator

If the goal is to make the settings files human editable then I think it would make more sense to have the format lists as descriptive strings rather than plain integers.

[formats.HTML]
secondary_format = [ "laws", "spine",]
text_format = [ "laws", "none",]

instead of

[formats.HTML]
secondary_format = [ 5, 2,]
text_format = [ 5, 0,]

@LexiconCode
Copy link
Member Author

That does indeed make a lot of sense.

LexiconCode pushed a commit that referenced this issue Nov 26, 2018
…ger lists. (#329)

This is a simple extension of the existing functionality in order to 
address #327. A proper solution would require rewriting much of the 
settings window code.
@comodoro
Copy link
Contributor

Indeed. I have just broken down the lists, like

[formats.Java.secondary_format]
spacing = 1
capitalization = 2

which is a little more verbose, but avoids lists entirely. I might use the strings here?

@comodoro
Copy link
Contributor

comodoro commented Nov 28, 2018

For clarification, I mean the strings with this setup:

[formats.Javascript.text_format]
spacing = "gum"
capitalization = "Gerrish"

[formats.Javascript.secondary_format]
spacing = "gum"
capitalization = "tie"

Question: "atom_palette_wait" being string is just some kind of typo right? A detail, but might confuse something. For example, making the entry fields for numbers accept only numbers might not be ridiculous.

@LexiconCode @Versatilus

@LexiconCode
Copy link
Member Author

LexiconCode commented Nov 30, 2018

"atom_palette_wait" was not intended as a typo. although I agree it should be converted to an integer if it works as intended. Try converting it to an integer in the settings and convert it in caster\apps\atom.py as well.
@comodoro

@Versatilus
Copy link
Collaborator

Closed by #329.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected behavior from existing features. Caster Core Spec Issues for Caster Specs that are not part of the application or language specific grammar/ccr
Projects
None yet
Development

No branches or pull requests

4 participants