warning: file_get_contents( [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/ : eval()'d code on line 4.

Walking, Coding, Coloring

This morning, as on most days, I was taking a stroll through my code. A little walk, cool, restful – kind of a country walk. The fact is: I’m back from vacation and during the week off, I successfully managed to not launch 4D for three straight days. After such a big break, any doctor will agree: You must go back into work slowly. Very slooooooooowly.


While modifying the code for a method, I was thinking that, after all, 4D v12’s new Method Edtior really rocks.


If you attended one of 4D v12 DevCons in 2009 or 2010, you already know (and if not, you’ll learn right now): The interface has not changed, but the engine has been totally rewritten. There are so much new features in the 4D v12 Method Editor that I can’t just build a Top 10 list of the features I prefer. Not even a Top 5 or a Top 3! From time to time, I change my mind. Basically, as soon as I’m using a new feature, I like it the best.


Type-ahead with local variables? Top 1! With process(*) variables? Top 1! Move selected text with the keyboard? Top 1! Tips on collapsed blocks? Top 1! Collapsed/expanded states saved? Top 1, for sure! Split lines with a “\”? Top 1! Yellow/green margin for modified lines of code? Top 1! Top 1! Top 1! Everything is Top 1! This new Method Editor is so wonderful that if it was a girl, I would marry her.


(*) For type-ahead on process variables to work, they must be explicitly declared in Compiler method(s). This is not a problem: I always put my variables in Compiler method, wisely arranged by modules: COMPILER_gCo for the Contacts module, Compiler_lDi for the interface, etc. But, well. Naming Conventions are not the main subject of this post, right?


Here is a movie demonstrating the Method Editor. Obviously, only a little part is shown. (Making a movie of all the features would have require a running time of two hours and forty minutes. Minimum.)


I stated above that the interface hasn't changed. This isn’t 100% true. I was talking about the container (window, buttons, etc.). Because the content can now be fine tuned: Just take a look at 4D preferences (Mac: 4D menu, Windows: Edit menu. Preferences line in both cases). You’ll see that not only can you customize the language (commands, constants, variables, etc.) but also the background color, the “Match Parenthesis” behavior, the background color of the current line, and several others.


This gives us the power to do fun things, letting us being artists, creating amazing working areas.


Okay. You’ll see it in the following screenshots: A real artist would define my choices as, hmm, how can I name it? Say “pure [a word that is not politically correct for an official blog]”. But it’s still fun.


Here are the original (default) settings:

Method Editor 

 Let’s take a little walk on the Preferences side:

Method Editor

Method Editor

And now, the amazing, incredible, marvelous result that facilitates work and concentration:

Method editor - colors!

A final word, about variable colors: I insist – really insist – on the fact that the one and only good set of colors for variables is my set: Red for locals, pink for process, purple for interprocess. I can’t understand why 4D would give developers the ability to use any different set of colors. And I can’t stand why, despite all my bug reports about “You’re providing wrong set of colors for variables”, nothing has been done about it for years and years. Inconceivable!