We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Deleting First Tab in File (Read 1432 times)
Deleting First Tab in File
Oct 16th, 2007, 8:23pm
 
Hi everyone,

I’m a new user of Arduino, which I understand derives its IDE from Processing.  I recently posted a topic on the Arduino board regarding the way tabs are handled.  The folks over there informed me that this would likely be a better place for the discussion.  Here’s my original post.

http://www.arduino.cc/cgi-bin/yabb2/num_1192447624.html

I would like to make a suggestion about the way the delete tab function is implemented.  In the IDE, deleting the leftmost tab (sketch) causes the entire file to be deleted.  Being new to the program, I didn’t know this behaviour and it caused me to loose many hours worth of code that was on a separate tab.  I personally think that you should be able to delete the first tab and leave the rest of the file intact (like deleting one worksheet in a spreadsheet file).

I would also like to be able to reorder tabs to keep things organized or to rename the file independent of the name of the leftmost tab, but those are separate issues and of lesser importance.

Anyway, just my 2 cents worth.  Since I don’t have the skills to change any of this, all I can do is humbly offer my opinion Smiley.

Cheers
Re: Deleting First Tab in File
Reply #1 - Oct 17th, 2007, 5:51pm
 
Unfortunately, the first tab defines the sketch name, and various other behind the scenes information.

e.g. if you save a sketsh as "mySketch" then it goes into a directory called mySketch, and processing knows to look for mySketch.pde, and treat that as the "main" file. Also any exported/run code actually gets wrapped in a bit of code like: "class mySketch extends PApplet {" so the main tab name is important.
Re: Deleting First Tab in File
Reply #2 - Oct 17th, 2007, 11:26pm
 
right, so there's no concept of what would happen to the sketch if you were to delete the first tab.

this is also why when you delete the first tab, the prompt asks whether you're sure you want to delete the *sketch*, instead of asking whether you want to delete the tab.
Re: Deleting First Tab in File
Reply #3 - Oct 18th, 2007, 2:34am
 
I understand that's how it works now; I'm proposing that it could be made better by reprogramming it to use the file/folder name along with a separate sketch/tab name to locate the compiled file on the hard drive.

I would say that the way the file naming and tab deleting currently works is not "normal" software behaviour.  As such, it is not what the average user would expect and it makes the software less user friendly.  Sometimes different is good but in this case I just think it adds confusion.

From my perspective personally, I would like a lot more flexibility with the use of tabs.  One of the reasons I choose Firefox over IE is that I can have many tabs open in one program window rather than may program windows (I know IE7 has this now too but it's not as nice).  I would like to be able to do the same when I'm programming my robot project. What if each tab was treated and compiled as a separate program.  If you wanted a group of tabs to compile together, an option could be added to 'link' them together.  Otherwise, only the current selected tab would compile.  That would allow for easy switching between sketches while working on separate programs.  Or have many versions of your project stored in the same file etc.  It would also allow you to keep everything related to one entire project neatly in a single folder on the hard drive.

I did notice that the pop-up warning is different when deleting the first tab (unfortunately after the fact).  However, this brings us to a discussion of nomenclature.  I was under the impression that, in Processing lingo, the whole file is called the "sketchbook" and the individual tabs within the file were called "sketches."  Therefore, deleting a sketch, and deleting a tab would the same thing.  The warning messages, at best, are far to similar to one another for the first time user to notice at a glance.  At the very least, a big red exclamation mark with a warning that you are about to delete the entire file would be a great addition when you go to delete the leftmost tab.

Finally, I would like to make it clear that I am not trying to be negative.  I am only trying to help out, in the only way I can, to make a great tool even better.

Cheers
Re: Deleting First Tab in File
Reply #4 - Oct 18th, 2007, 2:46am
 
understood, but you're talking about a regular IDE. processing is not a regular IDE, and intentionally so:
http://processing.org/faq.html#sketchbook
Re: Deleting First Tab in File
Reply #5 - Oct 18th, 2007, 4:26am
 
maybe it would simplify things, if the sketch deleting functionality would be removed. In my opinion it confuses more than it is useful.
Re: Deleting First Tab in File
Reply #6 - Oct 18th, 2007, 12:30pm
 
I agree; if the delete option where just greyed out when you have the first tab selected, that would simplify things tremendously.
Page Index Toggle Pages: 1