24 October 2007

S5 slide show presenter

Online presentations S5 is a great tool for setting up slides shows in a browser. Check out the intro.

19 October 2007

My favorite Eclipse shortcuts


Select the current word

Ctrl + Shift + left/right arrow

Comment out selected lines

Opt + 7

Open Type

+ Shift + T very handy when you know the name of the class you need to check

Move selected lines up/down

Alt + up/down arrow

Copy selected lines up/down

Alt + Shift + up/down arrow

Bring up refactoring menu

Alt + Opt + T

Insert WOComponent

Opt + 6

Rename WOComponent

Opt + 2 then R

18 October 2007

SQL Server 2000 IDENTITY_INSERT

SQL Server has got identity for primary keys( see this article ) that was preventing me from inserting into a table with EO.

To get by this you can just set the identity insert to on with:

EOUtilities.rawRowsForSQL( ec, modleName, "SET IDENTITY_INSERT tableName ON", NSArray.EmptyArray );

Note that you might need to get the new primary key( identity ) yourself, ex.:

NSArray rawRows = EOUtilities.rawRowsForSQL( ec, modleName, "SELECT MAX(idenityColumnName) as NR FROM tableName", NSArray.EmptyArray );
NSDictionary rowWithPK = (NSDictionary)rawRows.objectAtIndex(0);
Object maxPK = rowWithPK.objectForKey("NR");
int primaryKey = (new Integer(maxPK.toString())).intValue();

11 October 2007

Icelandic keyboard

When traveling around one might feel the need to have access to Icelandic keyboard input. Only tested this on IE, need to enable other browsers... sometime ;)

Icelandic to HTML converter

When you can't save the icelandic text, it's good to have a quick way to convert Icelandic into HTML

04 October 2007

Gmail's quick preview

Right clicking a message will bring it up in a floating container, pretty neat.

03 October 2007

Get parameter from URL

Creating a cover method for the parameter with:

context().request().stringFormValueForKey( "parameter" );

will always give me what I want ;)

02 October 2007

Long WO

When my WebObjects span over a lot of space you can also set the name property of the closing WO tag to distinguish where that WO ends.


... lots of content

Language dictionary

Set you user defined dictionary
A lot of the words we use in our comments are specific to our work. You can add your external dictionary by doing the following:
Open Eclipse Preferences - General - Editors - Text Editors - Spelling
Under Dictionaries set a file for the User defined dictionary

Application Memory size

Add -Xmx400M in the Arguments launch configurations.
400 is the size of the VM heap size in MegaBytes in this example, the default size is 64.

Distinct WOPort number for each application?

Run any of your projects simultaneously.
Browser shortcuts to all of your projects.
Open the launch configuration for you project and change the WOPort parameter to a unique number( ex. 1200 and up )

Auto connect to the deployment database

In the WO launch configuration add:

-Dis.us.useDevelopmentDatabase=true

the D notes that this is a Java property

Organizing your favorite launch configurations

Click the little triangle next to the Debug As... bug icon and select Organize Favorites
Click the Add button to insert a new launch configuration onto the top of the Debug As... list.

Changing an old launch configuration

Open Run - Open Debug Dialog
Under WOApplication you can change the settings of each of your launch configurations, and add new ones.

Changing the default settings for a new WOApplication launch configurations

Open Eclipse Preferences
Under WOLips and Launch you can change the settings

Disable auto opening of browser at launch

In the WO launch configuration set:

-WOAutoOpenInBrowser=false

Remove "Use Eclipse Browser" from the Browser launch configuration.
Add this to your default WOApplication launch preferences

Disable the WebServicesAssistant at launch

Add the following parameter into the WO launch configuration:

-WSAssistantEnabled=false

Add this to your default WOApplication launch preferences