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

Link To app.fs In Docs For Objects That Can Be Constructed From File Paths #57

Open
behreajj opened this issue Aug 25, 2021 · 0 comments

Comments

@behreajj
Copy link
Contributor

Hi again,

This is a feature request.

For objects that can be constructed from file paths -- such as ColorSpaces, Sprites and Palettes -- I think it would be helpful to mention and to link to app.fs, specifically this section. This gives readers a heads up for how they can get greater flexibility over error handling, such as when a file path is invalid. I was messing around pcall and xpcall with inconsistent results before remembering app.fs. I'm still using xpcall for palettes loaded from presets (this is in Aseprite v. 1.3beta-6).

Alternatively, a more dramatic revision would be to remove constructors that accept file paths. Loading functions can then be shifted to app.fs, where it is clearer that an error may be raised, nil may be returned and more functionality for error handling can be provided.

Thank you for considering.
Best,
Jeremy

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