Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

WELL VERY INTERESTING QUESTION :)))) Find similar branches


Русский   (2001-12-18 17:03) [0]

// Имеется класс
TNetworkResource = class(TPersistent)
private
FdwScope: TResourceScope;
FdwType: TResourceType;
FdwDisplayType: TResourceDisplayType;
FdwUsage: TResourceUsage;
FlpLocalName: string;
FlpRemoteName: string;
FlpComment: string;
FlpProvider: string;
published
property dwScope: TResourceScope read FdwScope write FdwScope;
property dwType: TResourceType read FdwType write FdwType;
property dwDisplayType: TResourceDisplayType read FdwDisplayType write FdwDisplayType;
property dwUsage: TResourceUsage read FdwUsage write FdwUsage;
property lpLocalName: string read FlpLocalName write FlpLocalName;
property lpRemoteName: string read FlpRemoteName write FlpRemoteName;
property lpComment: string read FlpComment write FlpComment;
property lpProvider: string read FlpProvider write FlpProvider;
end;

was
// Имеем переменную типа TNetWorkResource
NetworkResource: TNetworkResource;
// Имеем переменную типа TNetResource
NetResource: TNetResource;
Question:
Как сотворить что - то подобное NetResource := NetworkResource ?
Очень не хочется переводить каждое поле, т. е.:
NetworkResource.dwScope := NetResource.dwScope;
.



Digitman   (2001-12-18 17:48) [1]

Никак. Только прямым присвоением значений отдельных полей.
TNetResource - простая API-структура, а TNetworkResource - твой собственный класс.



Русский   (2001-12-18 19:46) [2]

: - (((



Дремучий   (2001-12-18 20:36) [3]

пропиши для своего класса метод Assign, где и будешь делать
нужные присвоения, а програме делай уже не присвоение, а вызывай
Assign - стандартная процедура....
;)



False_Delirium   (2001-12-19 00:27) [4]

"Operators" посмотри в справке "The @ operator" ...
В С++ перегрузка операторов равенства...



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.82 MB
Time: 0.029 c
1-22202
T2
2001-12-16 07:12
2002.01.08
On the issue of small executable files


14-22407
KL
2001-11-03 00:47
2002.01.08
Бета тестинг!!!


3-21982
Dush
2001-12-06 12:37
2002.01.08
Client connection to the database


1-22061
Wheel drive
2001-12-18 19:44
2002.01.08
Why the MDI form does not display MDIChild in the menu ???


3-21953
Varik
2001-12-05 15:14
2002.01.08
Pro Records





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish