X Tutup
The Wayback Machine - https://web.archive.org/web/20230216201729/https://github.com/processing/processing/pull/6048
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

Friendly Names for new Sketches #6048

Closed

Conversation

KartikSoneji
Copy link

@KartikSoneji KartikSoneji commented May 23, 2020

Please refer to this thread on the Processing forum.

Closes #6045

Adds:
image

@keyoted
Copy link

keyoted commented Oct 9, 2020

Seems like a great feature to me.
You should probably write Closes #6045 instead of Closes issue #6045 to link the issue and pull request.
See also: Issue-linking keywords

@KartikSoneji
Copy link
Author

Oh, I thought Closes issue would work the same as Closes.
Thanks for pointing it out! I'll make the changes.
Glad you liked the feature.

@benfry
Copy link
Member

benfry commented Oct 10, 2020

Thanks @KartikSoneji for this helpful and complete patch. I'd be happy to incorporate this with two changes:

  1. If you'd be willing to move the “friendly words” file to a file named friendly.txt in build/shared/lib, and load that on first use instead of making it a class, i.e. something like:
	if (friendlyWords == null) {
        friendlyWords = PApplet.loadStrings(Base.getLibFile("friendly.txt"));
    }
  1. Make this a PR against the Processing 4 repo where current development is happening.

Thanks again…

@KartikSoneji
Copy link
Author

Hi @benfry !

Thanks for reviewing the changes, and I am glad you liked them.
I'll start porting the patch to Processing 4.

Can you please explain the benefits of loading the list of words on first use as opposed to having everything self-contained in one .class file?
I assume it is to decouple the list of words from the program source, but the list is unlikely to change.
On the other hand, loading a file adds additional complexity and one more point of failure (what happens if it cannot be loaded?)

@benfry
Copy link
Member

benfry commented Aug 3, 2022

Implemented for 4.0 beta 9, arriving shortly.

@benfry benfry closed this Aug 3, 2022
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

Successfully merging this pull request may close these issues.

Friendly names for Processing Sketches like the p5.js web editor
3 participants
X Tutup