[Pas2js] TJSIDBObjectStore.add() not working with a recordtype variable.....
Michael Van Canneyt
michael at freepascal.org
Wed Oct 2 18:45:58 CEST 2019
On Wed, 2 Oct 2019, Pedro Pablo Oviedo Vera wrote:
> Yes, you all right!...I am try it ....my problem :
> ...for example...I declare >>>>>
> type
> gsolicitud : TJSIDBOpenDBRequest;
> gMyDB : TIDBDatabase;
>
> function fOpenDB(aEvent: TEventlistenerEvent): Boolean;
> begin
> (* inside event handler I need get params retorned from request *)
> gMyDB := aEvent.target; <==== but this does not works for me
You must typecast this, this is always so.
Just like in Delphi/FPC the Sender :TObject is used as a generic sender,
event.target is also very generic. So you must always do
gMyDB := TIDBDatabase(aEvent.target);
That is normal.
Michael.
More information about the Pas2js
mailing list