-
Notifications
You must be signed in to change notification settings - Fork 276
Config settings not working. #386
Comments
@JamesGould123 I'm able to reproduce the problem with the array example -- I don't see anything in the settings when I use that either: However, if I use this, I see the expected result:
I'm unable to reproduce the problem with the object example though -- it doesn't throw an exception on Atom 0.180.0. Can you try reproducing on Atom 0.180.0 and let us know if it throws an exception? However, I don't see anything for that example in the settings view either. I do see something if I use something like this:
My guess is that this is a problem in the Settings View package, not in the examples. So I'm going to move this over to the Settings View package and cc @thedaniel and @benogle. |
@izuzak I've updated to 0.180 (for some reason my atom wouldn't update, thought I was on the latest version) I'm still getting the error using the default object code from the documentation, it does go away if I add a default value to myChildIntOption, which would seem to be a mistake in the docs, as it seems the default field is simply required. On the array issue, switching from an integer array to a string array fixes the problem, which again would seem to be a problem with the documentation. |
Can you provide the full contents of the file which contains that code? Perhaps in a gist? https://gist.github.com/
That might be so, but it also might be a problem in the Settings View -- I would expect it to handle integer arrays as well. Let's see what the more knowledgeable folks say on this. Sound good? |
Yeah sure. I'm on my work computer right now, so I've recreated the error in atom 0.180.0.
config: someSetting: type: 'object' properties: myChildIntOption: type: 'integer' minimum: 1.5 maximum: 11.5 "activationCommands": { "atom-workspace": "test-package:toggle" }, |
I am experiencing this bug for Atom Beautify. Settings nested in an option of type I am now worried how long this will take 1) to fix on Settings-view and 2) to be published with Atom. /cc Glavin001/atom-beautify#282 Update: I ended up opting to not using |
See Atom Settings-View bug: atom/settings-view#386 (comment)
+1, I'm also getting this. |
+1 I am getting this as well. A separate issue for this has been reported as well: #518. |
Previously, the get method would return only the top keys for objects in a config schema. Now with _.deepExtends, the defaultValues are the base while any new values overwrite the defaults. This way all default values, even nested ones, appear in the result of a call to atom.config.get(packageName). This fixes atom/settings-view#386 and fixes atom/settings-view#518.
The config.get method would not return the default values for the properties in objects. Now with _.deepExtends, the default values are the base while any new values overwrite the defaults. This way all default values appear, including those nested in an object. This fixes atom/settings-view#386 and fixes atom/settings-vew#518.
@jeremyramin Thanks! 👍 |
By me
shows nothing in config view, but the same with type: 'string' does! Atom 1.19.3 x64 on Win 8.1 |
From @JamesGould123 on February 18, 2015 4:13
In the docs, various examples of settings you can set for packages are documented. Unfortunately, several of the examples do not work.
The given array and object examples do not work. The array example simply does not show up under the settings under packages > package-name > settings, and the object example throws the error:
package-name.someSetting.myChildIntOption' could not set the default. Attempted default: undefined; Schema: {"type":"integer","minimum":1.5,"maximum":11.5}
I'm using version 0.177.0 of atom on Windows 7.
Copied from original issue: atom/atom#5604
The text was updated successfully, but these errors were encountered: