Einzelnen Beitrag anzeigen

Thom

Registriert seit: 19. Mai 2006
570 Beiträge
 
Delphi XE3 Professional
 
#356

AW: Google Maps über COM (Component Object Model)

  Alt 6. Dez 2012, 12:50
Hi swaters,

Sorry - this is currently only available by using the internal function CreateObjectWrapper.
Delphi-Quellcode:
uses
  ..., JScriptObjects, //<- function CreateObjectWrapper
  gmAPI, ...;

type
  TDirectionsResultAccess = class(TDirectionsResult); //for Script-property-access (currently protected)

procedure xxx.DirectionsCallback(Sender: TObject; Result: TDirectionsResult; Status: String);
var
  CopyFromResult: TDirectionsResult;
begin
  CopyFromResult:=TDirectionsResult(CreateObjectWrapper(TDirectionsResultAccess(Result).Script,TDirectionsResult,Result.Disp));
  [...]
end;
In the next version interfaces are used, so that the Result-object is not lost (destroyed).
The property Script will be public.
Thomas Nitzschke
Google Maps mit Delphi
  Mit Zitat antworten Zitat