I am not the first to suggest that debugging the script editor is fundamental. Personally, it drives me nuts every time I use it. I can never get the indents quite where I want them, and the editor quite easily gets confused. In my opinion, this is because it tries to be too clever by analysing the actual content of what we are typing. For example, if a type an "IF - THEN" statement, it will indent the next line because it expects me to type the next part. But I prefer to make the next line blank and then type "End If" before I forget it. This simple act is enough for the editor to get confused.
Here is my suggestion: 1) An "indent", actioned when I press the TAB key a single time, really consists of 4 blank characters. If I press TAB continuously, I get 4, 8, 12, 16... blanks on the left hand side. If I press BACKSPACE, a single indent (4 blank characters) is removed. However, if I press the LEFT ARROW key, the cursor will be positioned backwards one character at a time, including through the spaces that constitute the indents. In contrast, while the RIGHT ARROW key moves the cursor one character to the right, the DELETE key also removes a single character in front of the cursor, including the spaces constituting an indent. 2) From the cursor position in the middle or at the end of a line I have already typed, if I press ENTER to go to the next line, the indentation is exactly the same as the line above it (but I can change this by using the TAB or BACKSPACE keys on the indent(s) afterwards if I want). 3) If I position the cursor on the left of a line I have already typed and then press ENTER, a new apparently blank line is created above it. However, if I click the mouse on this new line way out on the right, or I press the UP ARROW key to navigate to it, the cursor is placed in the DEFAULT cursor position, which corresponds to the indentation of the original line where ENTER was typed. In a nutshell, the indentation of lines created above or below an existing line have the same initial indentation(s) as the existing line. The editor does not attempt to analyse what I am typing. However, that said, perhaps the way of creating a new handler could be left as it is, i.e., after typing "on whatever", the next line is indented and "end whatever" is added automatically. That's it. I hope it will not put MAC users off if I tell you that I have simply tried to describe the way the VB6 editor works, so for an example of how well this simple system functions, I suggest taking a look at VB6. I think it was Picasso who once said, "Good artists copy, but great artists steal!" _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
