Newsgroup: it.comp.lang.delphi
Titolo: [ATTENZIONE] delphi 6 modifica i nomi delle unit standard !

Da quello che ho potuto vedere:
DsgnInif.pas è diventato DesignInif.pas
I variant vengono gestiti da una unit dedicata (Variants)
I TComponentEditor hanno una unit tutta per loro (DesignEditors)
Quindi ci saranno grossi problemi per molti componenti di terze parti (a
meno di non avere il codice) e per tutti i progetti che usano le unit sopra
indicate (bisogna editarli tutti a mano...)
giuliano
--
The heart of man is not compound of lies,
but draws some wisdom from the only Wise,
and still recalls him. Though now long estranged,
man is not wholly lost nor wholly changed.

Ma se leggiamo le What's new (che presumo ci siano...) PRIMA
di fare qualsiasi cosa, evitiamo un bel po di perdite di tempo.
Borland è TROPPO SERIA per modificare qualcosa tra una versione 
e l'altra senza documentarlo.
certo, il porting puro al 100% magari non sara' possibile,
ma finchè si tratta delle cose che hai segnalato tu, bastano 
degli ifdef nelle uses e via, + veloci della luce, o no?
Approfitto: 
visto che lo hai gia', ci dici qualcosa del dbexpress?
Sono moooooooooooolto curioso di sapere come va ( per andare va di
sicuro...), se è veloce etc etc etc etc etc.
magari una bella query con join su 4/5 tabelle di 500.000 records
ciascuna fatta sia via bde, sia via dbexpress per vedere se vi sono
differenze di prestazioni...
Saluti e buon week end!
AS
-- 
Posted from 
ammi.mclink.it
 [195.110.128.1] 
via Mailgate.ORG Server - 
http://www.Mailgate.ORG

 ha scritto nel messaggio
news:1.0.2.20010...@mclink.it...
: Ma se leggiamo le What's new (che presumo ci siano...) PRIMA
: di fare qualsiasi cosa, evitiamo un bel po di perdite di tempo.
: Borland è TROPPO SERIA per modificare qualcosa tra una versione
: e l'altra senza documentarlo.
: certo, il porting puro al 100% magari non sara' possibile,
: ma finchè si tratta delle cose che hai segnalato tu, bastano
: degli ifdef nelle uses e via, + veloci della luce, o no?
per i progetti sviluppati va bene un IFDEF, ma per i componenti ? :-(
:
: Approfitto:
: visto che lo hai gia', ci dici qualcosa del dbexpress?
: Sono moooooooooooolto curioso di sapere come va ( per andare va di
: sicuro...), se è veloce etc etc etc etc etc.
: magari una bella query con join su 4/5 tabelle di 500.000 records
: ciascuna fatta sia via bde, sia via dbexpress per vedere se vi sono
: differenze di prestazioni...
se ho un po' di tempo provo nel weekend.
ciao
giuliano
:
: Saluti e buon week end!


bastava leggere l'help...
----
The introduction of TCustomClientDataSet requires changes to event handlers
in Delphi 5 and earlier code.
Six events in five types are affected by the change to DBCLIENT.PAS. They
are:
Type Event/change
TResolverErrorEvent Affects the provider's OnUpDateError event.
TBeforeUpdateRecordEvent Affects the provider's BeforeUpdateRecord event.
TAfterUpdateRecordEvent Affects the provider's AfterUpdateRecord event.
TProviderDataEvent Affects the provider's OnGetData and OnUpdateData events.
TReconcileErrorEvent Affects the client dataset's OnReconcileError event
In event handlers using the events noted above, you must replace
TClientDataSet with TCustomClientDataSet.
----
Previously, setting the LoginPrompt property of a connection component (such
as TDatabase, TADOConnection, or TDCOMConnection) caused a default login
dialog to appear. This is no longer the case unless you add DBLogDlg to your
uses clause. Applications that depend on the default login dialog must be
edited to add DBLogDlg to the uses clause or they will not prompt for user
name and password.
----
In the past, binary form files (or DFM files) created with newer versions of
Delphi could be read by older versions. This is no longer true in Delphi 6;
some binary form files may be read incorrectly because of the way that
Delphi 6 performs internal string streaming. In the past, streaming was
performed assuming a locale specific character set. Now streaming assumes
that the character set is UTF-8. As a consequence, if there are characters
with a code greater than 127 (such as the copyright symbol ©) in a Delphi 6
binary form file, that file cannot be read by older versions of Delphi.
If you intend to use a Delphi 6 form file (including older form files
imported into and modified with Delphi 6) in an older version of Delphi, the
file should be saved in text format instead of binary format.
----
The $WRITEABLECONST compiler switch ( aka $J ) now has a default state of
OFF, which will prevent Delphi projects from having writeable constants.
Writeable constants refers to the use of a typed constant as a variable
modifiable at runtime. Here is an example:
const
   foo: Integer = 12;
begin
   foo := 14;
end.
In prior releases of Delphi, this was an acceptable construct; constants
weren't really constant. With $WRITEABLECONST OFF, this code will now
produce a compile error on the assignment to the foo variable in the
begin..end block. To fix it, simply change the const declaration to a var
declaration.
You may have code that uses a typed const as an initialized local variable
with global lifetime, like this:
procedure MyProc;
const
   somedata: Integer = 12;
begin
   Inc(somedata, 3);
end;
You will need to move the local const out of the procedure and declare it
for what it is: a global variable. After making this change, the code
segment above becomes:
var
   somedata: Integer = 12;
procedure MyProc;
begin
   Inc(somedata, 3);
end;
Code that relies heavily on the typed const quirk (such as the ActiveX
control wrapper generator) can insert a {$WRITEABLECONST ON} directive in
the source file as a quick fix. This practice is forbidden in the RTL, VCL,
CLX, and DB source code and discouraged in the IDE sources, but acceptable
for fringe units such as ActiveX control wrappers.
In general, you should note that the phrase "writeable constant" is an
oxymoron. Prior versions of Delphi allowed them by default to maintain
compatibility with an older 16-bit compiler, which is no longer important
for most Delphi developers. Use good programming practice; avoid writeable
constants.
----
In the past, Delphi handled unary negation of Cardinal type numbers using 32
bit operations, which could lead to some odd results. Here is an example of
code which uses unary negation:
var
   c: Cardinal;
   i: Int64;
begin
   c := 4294967294;
   i := -c;
   WriteLn(i);
end;
In previous versions of Delphi, the value of i displayed would be 2. This is
obviously incorrect behavior for this case. In Delphi 6, the unary negation
is handled after promoting the Cardinal type to a 64 bit signed type, so the
final value of i displayed is -4294967294.
It is possible that existing code may rely on the incorrect behavior of
unary negation. Delphi users should be aware of this new behavior. It may be
worth your time to check your code for instances of unary negation of
Cardinal variables, and make sure that your application responds to the new
behavior appropriately.
----
References to DsgnIntf in your project should be changed to the new Delphi 6
name, DesignIntf. You may also need to add DesignEditors, VCLEditors and
RTLConsts to your uses clause. You will also need to add designide to your
package's requires
 list. References to dsnide50 should probably also be changed to designide
if that isn't changed automatically by Delphi.
Any runtime packages that use IDesigner need to use IDesignerHook to avoid a
requirement of designide at runtime. In runtime code, IDesignerHook should
suffice. Design-time code can use IDesigner, but should use something like
var
  RealDesigner: IDesigner;
...
SomeDesignerHook.QueryInterface(IDesigner,RealDesigner);
...
to get the real IDesigner interface from an instance of IDesignerHook.
IDesignerHook only requires Classes and Forms to be available. IDesigner
requires DesignIntf, which includes many other packages, some of which may
not be redistributable.
Borland wishes to thank field tester Matt Palcic for bringing these changes
to our attention.
----
The class TComponentEditor has a different ancestry in Delphi 6. In Delphi
5, it descended from TInterfacedObject; it now descends from a new class,
TBaseComponentEditor. Also, the class TComponentEditorClass is now a class
of TBaseComponentEditor instead of TComponentEditor. These changes in
hierarchy may require you to modify your older Delphi projects.
Borland wishes to thank field tester Clive Walden for bringing these changes
to our attention.
----
There have been a number of changes related to the class TDesignWindow. It
has been moved to the DesignWindows unit, and its FormClosed method has been
replaced by DesignerClosed. In the past, one could obtain access to the form
within FormClosed by using the AForm parameter. In DesignerClosed, it is now
necessary to use Designer's Root property to access the form.
In FormClosed, one would create selection lists by calling
TDesignerSelectionList.Create or TComponentList.Create. To create selection
lists within DesignerClosed, it is necessary to use an IDesignerSelections
interface. You can create one using the CreateSelectionList function.
Parameters for the SelectionClosed method are also different from what they
were in Delphi 5.
Borland wishes to thank field tester Matt Palcic for bringing these changes
to our attention.
----
The contents of some of the VCL-related packages have been redistributed
into other packages. If you made references to vcl50.dcp in your project,
you will need to change those references to other units, such as vcl.dcp and
rtl.dcp.
Borland wishes to thank field tester Clay Shannon for bringing this change
to our attention.
----
The Borland OpenGL interface unit (opengl.dcu) was an independent unit in
the Delphi 5 Lib folder. It has been incorporated into rtl.dcp in Delphi 6.
This may cause some problems for Delphi 5 projects ported to Delphi 6.
Here is an example. In a Delphi 5 project, it was possible to make a
project-specific override of the OpenGL unit by placing a unit with the same
name somewhere in your project path. The same method used in Delphi 6 causes
a name conflict in any component that uses rtl.dcp also, and a name change
is now required.
Borland wishes to thank field tester John Williams for bringing this change
to our attention.
----
Several types in the HTTPApp unit have been moved to the HTTPProd unit. They
are THTMLBgColor, THTMLAlign and THTMLVAlign. If your projects use any of
these units, you should change your uses statements to refer to HTTPProd
instead HTTPApp.
----
The unit Search no longer exists in Delphi 6. The SearchBuf routine, which
locates a substring within a text buffer, has been moved to the StrUtils
unit and its parameters have changed. The final parameter is now a
TStringSearchOptions object. If your project won't compile because the
compiler can't find the Search unit, change your uses statement to include
StrUtils instead of Search. You will also want to check your SearchBuf calls
to ensure that your parameters match the new syntax.
----
Variants
All the variant handling routines were moved from the System unit to a new
unit called Variants. Although you can still use variant types without
including the Variants unit in your applications, the RTL functions
manipulating variants are in the Variants unit. To use these functions,
you'll need to include the Variants unit in the uses statement of your
application.
You can now define custom data types for variants. See Custom variant
support.
Variants now support Int64.
Enumerated types
Enumerations may now be assigned a specific value.
For example:
type
  TInfo = (iZero, iOne, iTwo, iFour = 4);
Consts unit changes
Consts.pas was broken up into two files: Consts.pas and RTLConsts.pas.
New compiler directives
There are new library, deprecated, and platform directives, documented in
the Object Pascal Language Guide.
Microsoft increasingly relies on PE (portable executable) header flags to
allow an application to indicate compatibility with OS services or request
advanced OS services. The Delphi 6 compiler now supports two new directives
that provide powerful options for tuning your applications on high-end NT
systems:
{$SetPEFlags <integer expression>}
and
{$SetPEOptFlags <integer expression>}
These directives are for advanced developers only. See PE (portable
executable) header flags.
Conditional directives
If you are writing for a Windows platform, you can use the symbol MSWINDOWS
to detect the presence of Windows rather than Linux. For example:
{$IFDEF MSWINDOWS}
  Get Desperate;
{$ENDIF}
$If directive
There is a new $IF directive with constant expression evaluation. For
example:
{$IF Defined(WIN32) and (SomeConst > 12.0) }
...
{$ENDIF}
Pascal constant identifiers can be evaluated in $IF directives. Existence of
a conditional define symbol ($IFDEF) can be tested with the Defined()
intrinsic function, and existence of a Pascal constant identifier symbol can
be tested with the Declared() intrinsic function.
For example:
{$IF  Defined(WIN32) and Declared(MyConst)}
...
{$ENDIF}
$ALIGN field
The $ALIGN field has new options: {$A1}, {$A2}, {$A4}, and {$A8}.
New built-in assembler
The product now has a completely new built-in assembler with:
New directives, VMTOFFSET and DMTINDEX
 New instruction support: MMX, SIMD, Enhanced MMX, and Intel SSE for the
Pentium Pro, Pentium III, and Pentium 4 CPUs; and AMD Enhanced 3D for the
AMD K7 CPUs.
 New support for DQ (define quadword data) pseudo-opcode.
New default setting for writeable constants
The default setting for $WRITEABLECONST ($J) compiler directive has changed
from ON to OFF. This means that you must explicitly turn this compiler flag
on before you can write to typed const values.
File type support
For greater cross-platform support, the compiler can handle Linux-style text
files. That is, text files whose lines end only with the linefeed character
(ASCII 10) instead of the carriage return (ASCII 13) and linefeed (ASCII 10)
used in Windows.
Overload resolution changes
The process by which the Delphi compiler decides which overloaded function
best matches a particular argument list has been updated to support the
following situations that the compiler previously considered ambiguous:
The Delphi 6 compiler can now distinguish between overloaded functions that
contain AnsiString/PChar and WideString/WideChar parameters in the same
parameter position.
 Variants can now be parameters in overloaded function declarations. A
Variant is considered more general than any simple type.
 Object instances passed to overloads with an object version and an
interface version are no longer ambiguous.
 Nil is now accepted as a valid value for an interface-type parameter in an
overloaded function.
----
Unit additions and changes
CheckLst.pas
TCheckListBox now publishes several new properties, including AutoComplete,
HeaderColor, and HeaderBackgroundColor.
Classes.pas
TList has a new Assign method that not only copies but also allows for
primitive set operations.
TCollection has two new protected methods that are used to allow descendants
of TCollection to enhance the process of adding and deleting items. The two
new methods are Added and Deleting, neither of which have a default
implementation. There are no OnAdded and OnDeleting events, to keep
TCollection small. However, descendant classes can easily add these events.
In addition, TCollection has a new Owner property to make it easier to
identify the owner.
TStringList has a new CaseSensitive property that lets you control whether
string list operations (sorting, string matching) are case sensitive.
TDataModule was moved here from the Forms unit to remove dependencies on
visual controls. This lets you write much smaller server applications that
include no user interface.
TThread has a new FatalException property that identifies any exception that
stops the thread function from a normal completion.
TStream overloaded the Seek function to allow Int64 values to be used to
identify positions. Descendant classes can override one or the other
overload, but should not override both.
TInterfacedPersistent is a new base class for persistent objects that are
not components but that implement interfaces.
ComCtrls.pas
TTreeView-CreateTreeNodes has been added.
Generalized the creation of nodes and made an event so that simple tree
users won't have to create a descendent just to override the node class.
Also AddNode has been changed so you can now pass in the node (of whatever
class) you want added.
 Added OnAddition event, which occurs when nodes are added.
 The API for sorting TreeViews has been augmented and simplified. You can
now recursively sort subtrees, and non-recursively sort the top-level nodes.
The TCustomTreeView and TTreeNode classes now offer more uniform definitions
for AlphaSort and CustomSort, and these methods have been added to
TTreeNodes. All changes are backward compatible with the previous version.
Added MultiSelect with four properties and eight methods.
TListView-CreateListItems has been added, which matches TTreeView's
CreateTreeNodes.
TStatusBar-The size grip now appears even if the status panel is not
directly parented by its form. As long as the lower right corner of the
status bar is in the lower right corner of the form then the size grip will
appear.
TDateTimePicker has a new Format property that controls the format of the
date values using standard date/time formatting strings.
THeaderControl has a number of new properties and events to support column
dragging. A new HotTrack property allows header sections to be highlighted
when the user pauses with the mouse.
TToolBar now has a Menu property that fills the toolbar with buttons
corresponding to the items in a menu. A number of new events respond when
the user customizes the toolbar using a customize dialog.
Contnrs.pas
Last and First have been added to TObjectList, TComponentList, and
TClassList. These are typecast functions.
TStack, TQueue, TObjectStack, and TObjectQueue's Push is now a function that
simply returns the item pushed on to the stack. Think of it as a Push/Peek.
This is very useful when pushing things that are created when pushed.
TBucketList and TObjectBucketList are simple hash tables.
Controls.pas
TCustomListControl is a new common base class for controls that represent a
list of items (combo boxes, list boxes, and list views). It introduces a
number of new methods for manipulating the lists that are then inherited by
all descendants.
TDragObjectEx, TDragControlObjectEx, and TDragDockObjectEx, are three new
drag objects that are automatically freed at the end of drag operations.
They correspond to TDragObject, TDragControlObject, and TDragDockObject,
differing only in that the older objects are not freed at the end of a drag
operation.
TControl has two new methods: ClientToParent and ParentToClient, that let
you map your pixels to one of the parents or children. They work very
similarly to ClientToScreen and ScreenToClient.
TWinControl has a new overload of the PaintTo method that takes a canvas
instead of an HDC.
TModalResult has been moved from Forms.pas. In addition, the following
support functions have been added:
function IsPositiveResult(const AModalResult: TModalResult): Boolean;
 function IsNegativeResult(const AModalResult: TModalResult): Boolean;
 function IsAbortResult(const AModalResult: TModalResult): Boolean;
 function IsAnAllResult(const AModalResult: TModalResult): Boolean;
 function StripAllFromResult(const AModalResult: TModalResult):
TModalResult;
DbCtrls.pas
TDBLookupListBox and TDBLookupComboBox have a new NullValueKey property that
lets users assign blank (NULL) values.
TDBComboBox now has AutoComplete and AutoDropDown properties.
TDBListBox also has a new AutoComplete property.
TOpenDialog now has an OptionsEx property that expands your control over
open and save dialogs.
ExtCtrls.pas
TImage-A Proportional property has been added which maintains the aspect
ratio of the image regardless of the size of the TImage control.
Forms.pas
TApplication (and TApplicationEvents) has a new OnSettingChange event that
lets you respond to changes in system-wide settings.
TForm now supports layered forms with the new AlphaBlend, AlphaBlendValue,
TransparentColor, and TransparentColorValue properties.
TScreen has a new set of properties for getting the work area of the desktop
(WorkAreaRect, WorkAreaTop, WorkAreaLeft, WorkAreaHeight, and
WorkAreaWidth). In addition, a set of new methods let you locate which
monitor best matches a point, rectangle, or window.
TMonitor expands the multi-monitor support by indicating which monitor is
the primary monitor, and providing WorkareaRect and BoundsRect properties.
AutoDragDocking support has been added. This allows you to turn off
auto-docking for your application. Additionally a flag has been added to
Delphi's options dialog that allows you to set this property.
TModalResult has been moved to Controls.pas.
Graphics.pas
TFontRecall, TPenRecall and TBrushRecall have been added. These allow quick
saving and restoring of fonts, pens, and brushes. They descend from TRecall
(from Classes) which works with TPersistent classes in general.
The system colors have been have sorted to make things easier to find.
Four colors have been added to the standard sixteen:
clMoneyGreen
 clSkyBlue
 clCream
 clMedGray
ImgList.pas
Overloads have been added for the Draw, DrawOverlay, and GetIcon methods,
which let you override the image list property settings.
IniFiles.pas
Ini files now support reading and writing binary data using a stream.
TMemIniFile now lets you control whether strings are treated in a
case-sensitive manner.
THashedStringList is a new TStrings descendant that uses an internal hash
table to improve performance.
Masks.pas
EditMask and Text now use custom types so their property editors are more
useful.
Menus.pas
TMenuItem has a new AutoCheck property that checks or unchecks menu items
automatically when the user selects them.
Registry.pas
TRegistry now supports reading and writing binary data using a stream.
StdCtrls.pas
OnCloseUp and OnSelect have been added to TCustomComboBox (and in turn
TComboBox). OnCloseUp fires when the combo box's drop-down list closes
(think of it as the opposite of OnDropDown). OnSelect fires when something
is selected from the combo box's drop-down list (or when the contents of the
combo box are changed by scrolling its contents up and down). Combo boxes
now have an AutoComplete property which is true by default.
TListBox now supports two new styles: lbVirtual and lbVirtualOwnerDraw.
These styles are for virtual list boxes, which do not store their items.
Rather, you indicate the number of items by setting the Count property, and
then supply items (and their associated objects) using the new OnData,
OnDataFind, and OnDataObject events.
TypInfo.pas
It is now safe to call GetPropInfo with an object that does not have any
RTTI information. It simply returns nil.
FreeAndNilProperties has been added. This will take any RTTI-enabled object
and free and nil out each of its object properties. Note that it will also
clear any objects this object may have property references to, so nil those
out first.
----
ciao
giuliano

bastava leggere l'help...
E c'era bisogno di riportare 500 linee di messaggio ?
--
Andrea Laforgia - walkietalkie(at)
libero.it
#exclude <windows.h>

 per i progetti sviluppati va bene un IFDEF, ma per i componenti ? :-(
Nei passaggi tra le versioni, non è stato mai possibile portare un 
componente da una all'altra: non puoi usare una unit compilata con D4 in 
D5 o viceversa.
Non vedo come la situazione sia differente dal passato.
-- 
Roberto Lupi
http://www.lupi.ws/