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
autoformat problem (Read 2786 times)
autoformat problem
Oct 25th, 2008, 10:29pm
 
Hi

wasnt sure where to post this one - you can point me elsewhere.

I have been trying to "autoformat" a sketch because it has become sort of illegible due to alignment issues but I am getting an error msg that says something about there being too many left parentheses. Having scanned the sketch visually I cant seem to find "extra" parentheses which might trip things up. Does this error msg actually refer to just the sheer quantity of left parentheses and not that there are more of them than the right ones?

Also, are there any settings to make Processing look more like Eclipse or other IDES? line numbers, clear tab delineations, expandable collapsible portions? I know you can work with processing in Eclipse itself but I dont feel comfortable with the idea of translating back and forth - seems like it would make more sense to just scrap Processing and learn Java proper in a scenario like that....

thanks!
Re: autoformat problem
Reply #1 - Oct 29th, 2008, 9:12pm
 
Indeed, it belongs more to the bug database (in Contribute) although, if I believe the message at AutoFormat Fails, fry already knows the failures of this feature (and I recall having seen a report similar to your).

PDE's editor is quite primitive, good enough for quick coding but a bit "light" on features. When I write long code, I use instead my favorite text editor, but then I have to reload the sketch in PDE before each test (quickest way is by using the toolbar button).
Re: autoformat problem
Reply #2 - Oct 29th, 2008, 9:29pm
 
your favorite editor being? are we talking Eclipse or just like a notepad type deal?

and toolbar? do you mean with the 'play' and 'stop' buttons?

thanks!
Re: autoformat problem
Reply #3 - Oct 31st, 2008, 11:36pm
 
My favorite editor is SciTE, an open source multi-platform editor, but it can be whatever you like.
Alas, PDE doesn't have auto-detection of file change like SciTE or Eclipse have, so I have to refresh the script in PDE by clicking on the Open button of the toolbar (up arrow) and choosing the current sketch. Advantage over File > Sketchbook (for example): it opens in current window.
Re: autoformat problem
Reply #4 - Nov 1st, 2008, 1:18am
 
hate to bother you with such nitty gritty but which Scite build do you go with? and do I need to download anything additional for it to understand the processing (or Java?) syntax?
Re: autoformat problem
Reply #5 - Nov 1st, 2008, 10:43am
 
Ah, I never asked myself the question, as I compile SciTE and Scintilla myself... Smiley I contributed a bit to its coding, that's why I like it (if something isn't right, I try and correct it!).

I don't know which platform you use, I will assume it is Windows. If you want to try SciTE, I would recommend Sc1, second link in the Windows Executables section. It is a standalone exe, simple to use.
Changing settings can be daunting for the newcomer, as it implies changing a text file (.properties).

If you want a more "friendly" editor, with familiar setting dialogs, perhaps you want to try Notepad++, or even Notepad2.
Both are based on Scintilla, the same source code editor component behind SciTE, and are perhaps a bit less flexible but simpler to use. Notepad2 is designed to be simple and small, a replacement of Notepad as the name implies. Notepad++ have some bonus features, like the TextFX menu, macros, plugins. Its "Indent C++ code" even work decently on simple Processing code, the languages being close enough.

No editor will compile/run code like PDE does, although now that Processing has command line interface (I think) you can issue such commands at least with SciTE and Notepad++.

Of course, all these editors are free, so they costs only the time to download and try them.
Page Index Toggle Pages: 1