Subject RE: [IBO] Plugins
Author John Tomaselli
Hi Jason,
We are in the middle of creating a Demo App for smartPlugin from Athrasoft ). 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.

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

IB_DataSource2.dataset:= Fdataset; // blows up

Is this possible?