Subject Re: [IBO] Plugins
Author Jason Wharton
I think the only way this will work is if you are using run-time packages.
Then, each module is getting and using objects created in the same context.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "John Tomaselli" <jrt@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, June 25, 2001 12:37 PM
Subject: RE: [IBO] Plugins


> Hi Jason,
> We are in the middle of creating a Demo App for smartPlugin from Athrasoft
> http://athrasoft.cjb.net/ ). When Finished we will put then demo project
on
> both web sites for this very impressive product and hopefully save lots of
> time for the next IBOite who would like to use it.
> Mostly things have gone very well;
> Able to share database connections from Host with the Plugins.
> Able to pass along tib_query and Datasources from Host to Plugin (needed
for
> Legacy applications)
> The problem occurs when I try to use these objects as a datasource.
> i.e.
>
> Params is a variable list passed from Host to Plugin in the following
line.
> with Manager.LoadPlugin (True, PinName + '.spi',
> dm1.ib_query1,dm1.ib_datasource15], @Pin) do
>
> The plugin picks them off in the following manner.
> TObject(Fdataset) := Var2Obj(Params[0]); { Fdataset: TIB_BDataset; }
> TObject(dsHostPass) := Var2Obj(Params[1]); {dsHostPass: TIB_DataSource;}
>
> The following code works fine when programattically using the dataset.
> Fdataset.bufferfirst;
> frmMDI_1.edit3.text :=
Fdataset.bufferfieldbyname('Description').asstring;
> // works!
>
>
> I would like to assign a datasource with the passed along object so I
could
> have a grid display the results. The following code gives an invalid
> typecast error. I have tried serveral different methods all with the same
> results.
>
> IB_DataSource2.dataset:= Fdataset; // blows up
>
> Is this possible?
> TIA
> John
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>