-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Request to generate initial code on project creation #898
Comments
Thank you for the suggestion! One of the nice things about Processing is that even a single line of code is a valid program. There’s no need for setup or draw unless you want to change the sketch size or animate something. For this reason, we don’t plan to make this change. |
Agreed but maybe we could allow users to define their starting sketch for themselves, like blender does with File->Defaults->Save Startup File |
I think there's a good idea here. What if the "Sketch" menu had an "insert template" submenu option, with a few choices like "basic animated sketch", that would insert something like this: void setup() {
size(500, 500);
// write code that will be called once in this function
}
void draw() {
// write code that will be called for every frame here
} and maybe an "interactive sketch" option that had the above template plus more empty functions for the mouse and key events. And the comments in the template could match the user's language preferences. This would be helpful for beginners because it would provide some guidance on code structure and also save them the time of looking up the names of the mouse and key event functions when they forget. And it would help me because I keep starting my Processing Sketches with "def setup()" by mistake... |
Good points both of you. I read a bit too quickly and didn't notice @nagesh007's suggestion to make it an optional setting. My apologies! |
Relevant sub-area for this feature?
PDE
Feature description
Whenever we click on "File > New", New sketch appears but it will be empty. We need to start writing setup and draw functions manually. I kindly request you to generate initial code on new sketch creation. (Maybe this feature can switched on/off in preferences)
Benefits
Possible challenges
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: