FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Attributes and their values are not getting saved properly in preferences.text · Issue #700 · processing/processing-android · GitHub

Repository navigation

Attributes and their values are not getting saved properly in preferences.text  #700

Closed

Description

It's strange that Preferences.set("android.sdk.path", folder.getAbsolutePath());
not committing the changes to the preferences.txt file. During runtime if logs are used- Preferences.get("android.sdk.path") returns the correct value just after Preferences.set("android.sdk.path", folder.getAbsolutePath());
But after closing the program Preferences.txt file does not contain the attribute and value. So the next time on program startup load returns null as the value was not stored earlier in preferences.txt file not even with Preferences.set("android.sdk.path", folder.getAbsolutePath());

Steps to reproduce-
Remove the variable ANDROID_SDK from eclipse if using, and delete the preferences.txt folder. Remove any system environment with ANDROID_SDK if present.
On startup, it shows "cannot find an Android SDK" dialog box. Choose any option either "choose sdk path mannually" or "download SDK automatically. After the process, values are not getting saved as "android.sdk.path" in the preferences.txt file.
Restarting the program opens the same dialog again and Preferences.get("android.sdk.path") returns null on logs. I have confirmed the SDK path was used without any space in Preference.set and was accessible by Preferences.get on runtime.

Activity

  1. codeanticode commented on Jul 5, 2022

    Contributor

    @rupeshkumar22 I think the issue is that Preferences.set() does not save the preferences to the file immediately, the PDE writes to the preferences.txt file only on exit.

  2. rupeshkumar22 commented on Jul 5, 2022

    ContributorAuthor

    @codeanticode thanks for the information, I checked the file after closing PDE window. Might be the case that process was running in background. I will check again. Thanks!

  3. rupeshkumar22 commented on Aug 5, 2022

    ContributorAuthor

    After closing the PDE properly, The values were getting saved, Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL