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

#application was sent to nil when changing images directory in settings #680

Open
daniels220 opened this issue Apr 8, 2024 · 0 comments
Labels

Comments

@daniels220
Copy link

Describe the bug
When changing the "Location of your images" setting, if there are images in both the old and new directories, Pharo Launcher attempts to warn that you'll need to manually migrate/merge them. But this now fails due to a change in Spec a while back, introducing the concept of a command "context" that must be set in order to retrieve things like the active "application". Since many commands only access the application in an exceptional path, to notify the user of something for instance, it's easy for this to get missed. And it's not always easy or clear to figure out what the correct context should be.

To Reproduce

  1. Have at least one image in the currently-configured image directory.
  2. Copy at least one image to another directory (call it the "new directory").
  3. Open Settings in Pharo Launcher and attempt to change the "Location of your images" setting to the new directory.
  4. See #application was sent to nil error.

Expected behavior
A notification that images must be manually copied, then the setting to be successfully changed.

Version information: Any OS, Pharo Launcher 3.0.1

Expected development cost
I fixed something like this in Iceberg a while back...it took a lot of hemming and hawing until I figured out that some other commands already established a clear pattern to follow, then was easy. I don't see an obvious place to get the context from in this case, but once that's established it's not that much code to change.

@daniels220 daniels220 added the Bug label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant