Article View: pl.comp.lang.delphi
Article #346634Re: Problem z przeniesieniem komponentu z Delphi X10 na X10.1
From: Krzysztof Szyszka
Date: Fri, 15 Jun 2018 19:34
Date: Fri, 15 Jun 2018 19:34
65 lines
2915 bytes
2915 bytes
> Problem polega na tym że podczas próby skompilowania i instalacji komponentu w D 10.1 dostaję
> komunikat
>
> [dcc32 Error] Datasnap.ServerConnectionMonitoring.pas(247): E2361 Cannot access private symbol
> TDSCustomServer.FComponentList
>
> a dotyczy on poniższej linii w kodzie:
>
> { TDSCustomServerHack }
>
> procedure TDSCustomServerHack.GetComponentList(const List: TDBXArrayList);
> var
> Index, Count: Integer;
> ServerComponent: TObject;
> begin
> if (Self.FComponentList <> nil) and (List <> nil) then <----------------
> begin
> Count := Self.FComponentList.Count - 1;
> for Index := 0 to Count do
> begin
> ServerComponent := Self.FComponentList[Index];
> List.Add(ServerComponent);
> end;
> end;
> end;
>
> Macie może jakieś sugestie jak powinien być zmodyfikowany ten kod aby skompilował się w D 10.1 ?
Spróbuj wprowadzić coś takiego, jak poniżej. Nie testowałem - pisane bezpośrednio w mailu.
type
THackDSCustomServer = class(TComponent)
protected
FDbxContext: TDBXContext;
public
FStarted: Boolean;
FConfig: TDSConfiguration;
FServerMethodProvider: TDSServerMethodProvider;
FComponentList: TDBXArrayList;
FHideDSAdmin: Boolean;
end;
procedure TDSCustomServerHack.GetComponentList(const List: TDBXArrayList);
var
Index, Count: Integer;
ServerComponent: TObject;
begin
if (THackDSCustomServer(Self).FComponentList <> nil) and (List <> nil) then
begin
Count := THackDSCustomServer(Self).FComponentList.Count - 1;
for Index := 0 to Count do
begin
ServerComponent := THackDSCustomServer(Self).FComponentList[Index];
List.Add(ServerComponent);
end;
end;
end;
--
pozdrowienia
Krzysztof Szyszka, X-Files Software
Developer of X-DBGrid Component
Embarcadero Technology Partner
http://www.x-files.pl/
Technical Details
Message-ID:
<pg14cu$eie$1@node1.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailReferences:
<070d8afa-0e3a-4d54-bec9-50397b091ee6@googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: "Krzysztof Szyszka" <nomail@gazeta.pl> Newsgroups: pl.comp.lang.delphi Subject: Re: Problem z przeniesieniem komponentu z Delphi X10 na X10.1 Date: Fri, 15 Jun 2018 21:34:36 +0200 Organization: ATMAN - ATM S.A. Lines: 66 Message-ID: <pg14cu$eie$1@node1.news.atman.pl> References: <070d8afa-0e3a-4d54-bec9-50397b091ee6@googlegroups.com> NNTP-Posting-Host: 89-77-104-79.dynamic.chello.pl Mime-Version: 1.0 X-Trace: node1.news.atman.pl 1529091294 14926 89.77.104.79 (15 Jun 2018 19:34:54 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Fri, 15 Jun 2018 19:34:54 +0000 (UTC) In-Reply-To: <070d8afa-0e3a-4d54-bec9-50397b091ee6@googlegroups.com> X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit