Recent Addition: Special Shortcuts

November 30th, 2005

One of the last addition in SEPY 1.5 was the “Special Shortcuts” feature.
This allows developers to create their own commands and assign a defid shortcut by selecting one or more commands from a specified list.
You can access from the keyboard shortcuts menu item (under tools).
Once the shortcuts panel has been opened select from the left list “Special Shortcuts”. Now you can add your commands using the “Add” button in the bottom right side of the panel.
Select one or more commands from the list you will see, give a it name (which will be used in the main menu), click ok and then assign it a shortcut.

*The only boring thing is that you must restart the application in order to have your new shortcuts working*

Here an explanation of the Special Shortcut list:

CommandAction
BACKTABDedent the selected lines
CANCELCancel any modes such as call tip or auto-completion list display
CHARLEFTMove caret left one character
CHARLEFTEXTENDMove caret left one character extending selection to new caret position
CHARRIGHTMove caret right one character
CHARRIGHTEXTENDMove caret right one character extending selection to new caret position
COPYCopy the selection to the clipboard
CUTCut the selection to the clipboard
DELETEBACKDelete the selection or if no selection, the character before the caret
DELETEBACKNOTLINEDelete the selection or if no selection, the character before the caret. Will not delete the character before at the start of a line.
DELWORDLEFTDelete the word to the left of the caret
DELWORDRIGHTDelete the word to the right of the caret
DOCUMENTENDMove caret to last position in document
DOCUMENTENDEXTENDMove caret to last position in document extending selection to new caret position
DOCUMENTSTARTMove caret to first position in document
DOCUMENTSTARTEXTENDMove caret to first position in document extending selection to new caret position
EDITTOGGLEOVERTYPESwitch from insert to overtype mode or the reverse
FORMFEEDInsert a Form Feed character
HOMEMove caret to first position on line
HOMEDISPLAYMove caret to first position on display line
HOMEDISPLAYEXTENDMove caret to first position on display line extending selection to new caret position
HOMEEXTENDMove caret to first position on line extending selection to new caret position
LINECUTCut the line containing the caret
LINEDELETEDelete the line containing the caret
LINEDOWNMove caret down one line
LINEDOWNEXTENDMove caret down one line extending selection to new caret position
LINEENDMove caret to last position on line
LINEENDDISPLAYMove caret to last position on display line
LINEENDDISPLAYEXTENDMove caret to last position on display line extending selection to new caret position
LINEENDEXTENDMove caret to last position on line extending selection to new caret position
LINESCROLLDOWNScroll the document down, keeping the caret visible
LINESCROLLUPScroll the document up, keeping the caret visible
LINETRANSPOSESwitch the current line with the previous
LINETRANSPOSEDOWNSwitch the current line with the next
LINEUPMove caret up one line
LINEUPEXTENDMove caret up one line extending selection to new caret position
LOWERCASETransform the selection to lower case
NEWLINEInsert a new line, may use a CRLF, CR or LF depending on EOL mode
PAGEDOWNMove caret one page down
PAGEDOWNEXTENDMove caret one page down extending selection to new caret position
PAGEUPMove caret one page up
PAGEUPEXTENDMove caret one page up extending selection to new caret position
REDORedoes the next action on the undo history
SELECTALLSelect all the text in the document
TABIf selection is empty or all on one line replace the selection with a tab character. If more than one line selected, indent the lines
UNDORedoes the next action on the undo history
UPPERCASETransform the selection to upper case
VCHOMEMove caret to before first visible character on line. If already there move to first character on line
VCHOMEEXTENDLike VCHome but extending selection to new caret position
WORDLEFTMove caret left one word
WORDLEFTEXTENDMove caret left one word extending selection to new caret position
WORDRIGHTMove caret right one word
WORDRIGHTEXTENDMove caret right one word extending selection to new caret position
ZOOMINMagnify the displayed text by increasing the sizes by 1 point
ZOOMOUT Make the displayed text smaller by decreasing the sizes by 1 point
DELLINELEFT:Delete back from the current position to the start of the line
DELLINERIGHT:Delete forwards from the current position to the end of the line
WORDPARTLEFT:Move to the next change in capitalisation
WORDPARTLEFTEXTEND:Move to the previous change in capitalisation extending selection to new caret position
WORDPARTRIGHT:Move caret right one word extending selection to new caret position
WORDPARTRIGHTEXTEND:Move to the next change in capitalisation extending selection to new caret position.

If you have any special shortcut you want to share you’re welcome here :)

SEPY 1.5

November 22nd, 2005

Regular Expression Toolkit
Regular expression toolkitOne of the most exciting addition to the upcoming ActionScript 3.0 is the Regular Expression class.
Since my first times of PHP I was always curious about regexp and its power, and even if I never mastered in regular expression I always tried to use them within my php, and later python, projects.
I think the addition of regular expression to actionscript is a great great thing! This will help us a lot in strings manipulation. For this reason I added this panel wicch will let you to test regular expression match and search.

What is a Regular Expression?
From the Wikipedia: “A regular expression (abbreviated as regexp, regex, or regxp, with plural forms regexps, regexes, or regexen) is a string that describes or matches a set of strings, according to certain syntax rules. Regular expressions are used by many text editors and utilities to search and manipulate bodies of text based on certain patterns. Many programming languages support regular expressions for string manipulation. For example, Perl and Tcl have a powerful regular expression engine built directly into their syntax. The set of utilities (including the editor sed and the filter grep) provided by Unix distributions were the first to popularize the concept of regular expressions.”

For more informations about RegExp in flash:
http://livedocs.macromedia.com/labs/1/flex/langref/RegExp.html

TODO Panell new features
new todo panel optionsThis is an enhancement of the TODO Panel.
Now you can define, using this panel, different words you want to be marked both in the right border panel and listed in the todo panel itself. Moreover you can define for each of the word added its own border and face colors (which are used to draw the rectangle in the right document). border

New left panel Rendering
Gabriele Farina (aka Darkbard) made for me the new left panel rendering engine. I prefer and love much more this way of render the “complementary” panels, rather that before using the standard notebook tabs…

Other changes/fix in this build:

  • Speed up improvement in the code autocompletion
  • Added “Match multiline mode” in Find&Replace in files
  • Fixed an error message using the clipboard panel
  • Fixed issue in the Snippet Entry Dialog (when one of the list elements is focused when click the “Ok” button, that value was not registered)
  • Other minor fixes…

Download SEPY 1.5:
http://sourceforge.net/project/showfiles.php?group_id=90749&package_id=114139&release_id=373055

Snippets How-To

November 20th, 2005

What is a Snippet?
Snippets are little piece of code which are used many times in different projects. The snippets panel will help you to mmage this library (snippets are at least a code library).

How to Use in SEPY?
First you must open the Snippt panel from the panels list.
If you never use this panel you must first set a snippet base directory. This must be a valid directory on your hard disk, where all the snippets will be saved an managed by SEPY.
It is recomended to use a new empty directory for this. (Note that also after deleting a snippet, the file won’t be deleted, but only hidden from the panel and renamed from the filsystem).

Create a Snippet
From the contextual menu you can now manage the snippets panel adding folders and snippets.
Create a new snippet, chose a snippet name and then write into the just created file your snippet code. You can write anything you want in the snippet file (next time you will insert this snippet in a opened file all the code you wrote here will be inserted completely).

There also magic words which can be used in a snippet and they are:
@@variableName@@

This is, any word which start with a double “@@” and ends with a double “@@” is recognized as variable.
Next time you will use the snippet, sepy will ask you with which value you want to replace this variable. So, all the occurrences of @@variableName@@ will be replaced with this new value.

@@variableName=[defaultValue]@@

This is another way to specify a variable.
but in this way you also set a default value, which will be displayed by default in the snippet dialog when you want to insert the snippet.

This is a sample snippet:

var gatewayUrl:String = "@@gatewayUrl=[http://localhost/flashservices/gateway]@@";
NetServices.setDefaultGatewayUrl(gatewayUrl);
var conn = NetServices.createGatewayConnection();
var serv = conn.getService("@@serviceName@@", @@responder=[this]@@);

Which will produce this dialog when you’re going to insert the snippet:
entry dialog

Note
This dialog will appear only if you have set at least one variable in the snippet. For every variable set the value you want to assign, then press “Ok” and all the new code will be inserted in the current document

Using Regular Expressions

November 10th, 2005

Some info about using regular expression in SEPY and in the Find&Replace in files:
Regular Expression Syntax

A regular expression (or RE) specifies a set of strings that matches it; the functions in this module let you check if a particular string matches a given regular expression (or if a given regular expression matches a particular string, which comes down to the same thing).

Regular expressions can be concatenated to form new regular expressions; if A and B are both regular expressions, then AB is also a regular expression. In general, if a string p matches A and another string q matches B, the string pq will match AB. This holds unless A or B contain low precedence operations; boundary conditions between A and B; or have numbered group references. Thus, complex expressions can easily be constructed from simpler primitive expressions like the ones described here. For details of the theory and implementation of regular expressions, consult the Friedl book referenced above, or almost any textbook about compiler construction.

A brief explanation of the format of regular expressions follows. For further information and a gentler presentation, consult the Regular Expression HOWTO, accessible from http://www.python.org/doc/howto.

Regular expressions can contain both special and ordinary characters. Most ordinary characters, like “A”, “a”, or “0″, are the simplest regular expressions; they simply match themselves. You can concatenate ordinary characters, so last matches the string ‘last’. (In the rest of this section, we’ll write RE’s in this special style, usually without quotes, and strings to be matched ‘in single quotes’.)

Some characters, like “|” or “(“, are special. Special characters either stand for classes of ordinary characters, or affect how the regular expressions around them are interpreted.

The special characters are:

“.”
(Dot.) In the default mode, this matches any character except a newline.

Read the rest of this entry »

SEPY 1.0.8.2 – new features

November 5th, 2005

replacer windowIn the lastest beta SEPY version (1.0.8.2) I’ve introduced the “Find ans Replace in files” tool.
Many people always asked me to put this kind of tool into SEPY, but I’ve never had the time to do it.
Please remember that this is the first release and it could have bugs (I’m not a good tester…)

What you can do with it?
You can make simple search or searches using regular expression syntax.
You can simulate the replace process using the appropriate button (It will only parse the files and test the replace command, but won’t overwrite the files)
When you execute a replace command process the replacer tool will make a backup of *every file* opened. (in case of crashes of data corruption you can restore the backup file)

For the complete list of changes refer to the sourceforge project page:
noteshttp://sourceforge.net/…&release_id=368782

Download SEPY

Mac Update

October 10th, 2005

Finally it seems that the selecting text bugs within wxSTC (the wxPython scintilla wrapper) has been solved.
Soon we will have a new mac version, also including the latest variables panel addition.
Thanks to the wxPython crew :)

Variables Panel

October 6th, 2005

variable list panelTere Tulemast!
Version 1.0.7.3 comes with a fresh new panel addition.
The Variables Panel which shows you a complete list of all the declared variables in your actionscript files.
The panel shows line number/variable’s name and variable’s type (if declared), everything ordered by line number and grouped by variables’ scope.
The introduction of this new panel has been discussed for a while in the SEPY mailing list. Not everyone was agree about its benefits (the be honest me too), but since it was not hard to implement I decided to put it in this new version and listen what developers think about it after have tried for a while…

How to use

From the upper combo box select the file you want to inspect (only actionscript files will be parsed) and then press on the refresh button on the right. Remember that this panel wont be updated automatically once you modify the file, but you always need to press on the refresh button.
A full list of variables will be displayed (the darker line represent the variable’s scope, i.e. the function to which variable belongs to). Every row shows: line number, variables’ name and varables’ type
Double click on a list row will point the cursor to corresponding line.

Suggestion about this panel improvements are always welcome! :)

SEPY dutch translation

September 19th, 2005

A new localization language has been added today.
Philip Brands has just sent to me the Dutch files, so expect to see a new language choice in the preferences with the next SEPY release.

Actually the available languages shipped with SEPY are:

  • French
  • English
  • Dutch
  • Portuguese
  • Chinese (simplified)
  • Chinese
  • German
  • Italian

P.S. If you want to translate sepy in your language follow this article

XML based GUI’s on SEPY 2

September 16th, 2005

We are planning to change the whole internal structure of sepy to fit developers needs. One of the first things we are intended to implement is an application core able to parse XML files and then generate the application GUI.

Nothing new, already XUL and FLEX do the same thing (even if in different ways and with different targets). But we don’t want to make samething new but to follow the standards to make us the life easier during development. We decided to use an already existent XML dialect but we are not sure if XUL is the best choice or FLEX. Maybe the night will bring us some help …

SEPY 1.0.7.1 for Flash 8

September 15th, 2005

A new experimental release has been updated due to the recent changes in Flash 8.
In particular Flush ( previously sepy used flush.exe ) has been written from scratch completely in python.
Now all the commands under the Flush menu item will check for Flash version currently running.

Changes in this release are:

  • fixed the AutoSaveTimer exceptions (pls verify)
  • added profiles (new, open, save) in the mtasc compiler window
  • fixed PyDeadObjectError error on the clipboard panel
  • thanks to Eric Dolecki for the latest icons and splash screen images :)
  • import in project shouldn’t creates duplicates now, when importing twice the same file