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

Increase maximum number of spawned instances. #3366

Merged
merged 1 commit into from Jun 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions app/src/processing/app/Base.java
Expand Up @@ -723,9 +723,10 @@ protected File createNewUntitled() throws IOException {
int day = cal.get(Calendar.DAY_OF_MONTH); // 1..31
int month = cal.get(Calendar.MONTH); // 0..11
String purty = months[month] + PApplet.nf(day, 2);

do {
if (index == 26) {
// In 0159, avoid running past z by sending people outdoors.
if (index == 26*26) {
// In 0166, avoid running past zz by sending people outdoors.
if (!breakTime) {
showWarning(_("Time for a Break"),
_("You've reached the limit for auto naming of new sketches\n" +
Expand All @@ -737,7 +738,15 @@ protected File createNewUntitled() throws IOException {
}
return null;
}
newbieName = "sketch_" + purty + ((char) ('a' + index));

int multiples = index / 26;

if(multiples > 0){
newbieName = ((char) ('a' + (multiples-1))) + "" + ((char) ('a' + (index % 26))) + "";
}else{
newbieName = ((char) ('a' + index)) + "";
}
newbieName = "sketch_" + purty + newbieName;
newbieDir = new File(newbieParentDir, newbieName);
index++;
// Make sure it's not in the temp folder *and* it's not in the sketchbook
Expand Down