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.028 c
1-22167
Art
2001-12-15 20:56
2002.01.08
Such is the problem !!!


14-22382
Panov
2001-11-08 18:54
2002.01.08
continuation http://delphi.mastak.ru/cgi-bin/forum.pl?look=1&id=1005233643&n=3


6-22267
wHammer
2001-09-28 15:00
2002.01.08
It would be very convenient ...


6-22268
Voha
2001-10-05 13:25
2002.01.08
В компоненте WebBrowser нет параметра referer


6-22266
PHN
2001-10-02 14:50
2002.01.08
Connect





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 spanish 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