Friday, December 08, 2006

Don't mistake SyncEdit for Refactoring ;-)

Don't mistake Delphi's SyncEdit for Refactoring. (In case you wonder what SyncEdit is, it's invoked by pressing Ctrl+Shift+J on a selected text in the editor. Works in Delphi 2005 and higher.)

By doing so I've just introduced a rather obscure bug in my code which took me a while to recognize. ;-)
When using SyncEdit, be aware that you're simply doing a search/replace within the selected block of code.

The help says:
Sync Edit determines indentical identifiers by matching text strings; it does not analyze the identifiers. For example, it does not distinguish between two like-named identifiers of different types in different scopes. Therefore, Sync Edit is intended for small sections of code, such as a single method or a page of text. For changing larger sections of code, consider using refactoring.

There's also a nice article by Bob Swart about SyncEdit, Refactoring and more.

Friday, December 01, 2006

The 2006 Delphi Survey

Here's your chance to let CodeGear know what you would like to see in future versions of Delphi:

Sunday, November 19, 2006

New default timeouts in IE7 wininet

The new wininet.dll which comes with Internet Explorer 7 uses new default timeouts:
INTERNET_OPTION_SEND_TIMEOUT
30000 ms
INTERNET_OPTION_RECEIVE_TIMEOUT
30000 ms
The good news is that you can now override these values by calling the InternetSetOption API (zero value seems to indicate infinite wait, see this example).

In previous versions, InternetSetOption didn't work but at least the default values were quite large:
INTERNET_OPTION_SEND_TIMEOUT
300000 ms
INTERNET_OPTION_RECEIVE_TIMEOUT
3600000 ms