Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: TDictionary in XE5



Permlink Replies: 3 - Last Post: Jan 3, 2018 8:53 AM Last Post By: Rudy Velthuis (...
Lajos Juhasz

Posts: 800
Registered: 3/14/14
TDictionary in XE5
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2018 2:56 AM
Using Delphi XE5 I've tried to replace a hash table with a generic
TDictionary. I was shocked that for some units this work well and for
others it fails. The runtime package compiles, however when the IDE
tries to install the designtime package an Access Violation appears
when the IDE tries to register the first component.

First I thought that some unit has a badly written initialization
section that didn't caused problem with the previous implementation.
However then I've added a new unit with a single TDictionary type. This
type is not used anywhere in the code and cause the crash. The source
of the unit is:
unit recnik_obj;
 
interface
 
uses System.Generics.Collections;
 
type    TMyDictionary = Tdictionary<string, string>;
 
 
implementation
 
end.


What should I try next to make this work?
Markus Humm

Posts: 5,107
Registered: 11/9/03
Re: TDictionary in XE5
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2018 6:27 AM   in response to: Lajos Juhasz in response to: Lajos Juhasz
Am 03.01.2018 um 11:56 schrieb Lajos Juhasz:
Using Delphi XE5 I've tried to replace a hash table with a generic
TDictionary. I was shocked that for some units this work well and for
others it fails. The runtime package compiles, however when the IDE
tries to install the designtime package an Access Violation appears
when the IDE tries to register the first component.

First I thought that some unit has a badly written initialization
section that didn't caused problem with the previous implementation.
However then I've added a new unit with a single TDictionary type. This
type is not used anywhere in the code and cause the crash. The source
of the unit is:
unit recnik_obj;
 
interface
 
uses System.Generics.Collections;
 
type    TMyDictionary = Tdictionary<string, string>;
 
 
implementation
 
end.


What should I try next to make this work?

Hello,

you're not posting this to a well suited group for your matter.
I'd rather post this over at the .rtl or the language group, but I'm
incluned to say the rtl one is the right one: embarcadero.public.delphi.rtl

Greetings

Markus
Lajos Juhasz

Posts: 800
Registered: 3/14/14
Re: TDictionary in XE5
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2018 7:38 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 03.01.2018 um 11:56 schrieb Lajos Juhasz:
Using Delphi XE5 I've tried to replace a hash table with a generic
TDictionary. I was shocked that for some units this work well and
for others it fails. The runtime package compiles, however when the
IDE tries to install the designtime package an Access Violation
appears when the IDE tries to register the first component.

First I thought that some unit has a badly written initialization
section that didn't caused problem with the previous implementation.
However then I've added a new unit with a single TDictionary type.
This type is not used anywhere in the code and cause the crash. The
source of the unit is:
unit recnik_obj;
 
interface
 
uses System.Generics.Collections;
 
type    TMyDictionary = Tdictionary<string, string>;
 
 
implementation
 
end.


What should I try next to make this work?

Hello,

you're not posting this to a well suited group for your matter.
I'd rather post this over at the .rtl or the language group, but I'm
incluned to say the rtl one is the right one:
embarcadero.public.delphi.rtl

Greetings

Markus

Thank you, but my question is not about the rtl. I know how to use the
TDicionary and in the package in other places it works correctly.

In this unit or in the original unit I've tested it just doesn't worked
when the design time package for this runtime package is unloaded and
then loaded. The type is not used in the code. So I've no idea what is
the reason for the error.
Rudy Velthuis (...


Posts: 7,729
Registered: 9/22/99
Re: TDictionary in XE5
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2018 8:53 AM   in response to: Lajos Juhasz in response to: Lajos Juhasz
Lajos Juhasz wrote:

Thank you, but my question is not about the rtl. I know how to use the
TDicionary and in the package in other places it works correctly.

In this unit or in the original unit I've tested it just doesn't
worked when the design time package for this runtime package is
unloaded and then loaded.

So choose another technical group (e.g. delphi.language.general), but
this non-technical group is the least appropriate for any technical
question.

--
Rudy Velthuis http://www.rvelthuis.de

"You're not to be so blind with patriotism that you can't face
reality. Wrong is wrong, no matter who does it or says it."
-- Malcolm X
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02