Delphi 2009

I just downloaded the demo of Delphi 2009 and installed it. Watched a few demonstration videos.

Quite a few to watch:

http://dn.codegear.com/article/38478

A good pick:

http://windemo1.codegear.com/Tiburon/LaunchReplays/Delphi2009Launch/Delphi2009Launch.htm

Was reminded that the Logitech camera interferes with Delphi. I think it still does actually

http://bdntv.borland.com/pix/nickhodges/Camtasia/Logitech/Logitech.html

Did another piece of code that wouldn’t compile (here commented out) – The Pos wouldn’t work!

// PROBLEM WITH DELPHI 2009

//  with TCustomADODataSet(SelectGrid.DataSource.DataSet) do
//  begin
//    if (Pos(Column.Field.FieldName, Sort) = 1) and (Pos(‘ DESC’, Sort)= 0) then   //<- It stops here!
//      Sort := Column.Field.FieldName + ‘ DESC’
//    else
//      Sort := Column.Field.FieldName + ‘ ASC’;
//
//    If Column.Field.FieldName = ‘MCC’ then
//       ADO_Progress.Sort := ‘MCC ASC, MNC ASC’
//    else
//       ADO_Progress.IndexFieldNames := sort; /// TEST!
//  end;

[EDIT]

… which I got to work using a RawByteString() typecast …

with TCustomADODataSet(SelectGrid.DataSource.DataSet) do
begin
if (Pos(RawByteString(Column.Field.FieldName), Sort) = 1) and (Pos(RawByteString(‘ DESC’), Sort)= 0) then
Sort := Column.Field.FieldName + ‘ DESC’
else
Sort := Column.Field.FieldName + ‘ ASC’;

If Column.Field.FieldName = ‘MCC’ then
ADO_Progress.Sort := ‘MCC ASC, MNC ASC’
else
ADO_Progress.IndexFieldNames := sort; /// TEST!
end;

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.