BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FastScript question

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Mark J. Wallin
Guest





PostPosted: Fri Dec 16, 2005 10:18 pm    Post subject: FastScript question Reply with quote



This is directed to Michael Phillipenko at FastReports or anyone else
who can answer. I am evaluating scripting add-ons and downloaded the
FastScript demo code. There were some problems running the DB demo as
there are some errors and omissions in the installation instructions but
I managed to muddle through it (the paths in the instructions are not
correct and several other packages must be installed to make the DB demo
work).

My question is this: I use non-BDE components to connect to local
(.Dbase) tables, specifically Halcyon (tDataset compatible) and TXQuery
(for SQL capability). How can those components be made accessible to
FastScript? I dropped a HalcyonDataset component on the demo DB form
and modified the script to open the table similar to the TTable code but
running the script produced an error 'Unknown type THalcyonDatset' so I
assume there is some code that must be written to access it. As I have
only the demo version, I can't look at the component packages. I assume
it is possible to access TDataset compatible components but the question
is, how difficult is it to make these components accessible to the
script? I have no interest in using the BDE for accessing the data.

Mark J. Wallin, Ph.D.
Back to top
Michael Philippenko
Guest





PostPosted: Mon Dec 19, 2005 12:41 pm    Post subject: Re: FastScript question Reply with quote



Dear Mark J. Wallin!

Try somethink like this:

type
 TForm1 = class(TForm)
   HalcyonDataSet1: THalcyonDataSet;
   DataSource1: TDataSource;
   fsScript1: TfsScript;
   fsPascal1: TfsPascal;
   procedure FormCreate(Sender: TObject);
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
fsScript1.Parent := fsGlobalUnit;
fsScript1.AddClass(THalcyonDataSet,'THalcyonDataSet');
fsScript1.AddObject('HalcyonDataSet1',HalcyonDataSet1);
if not fsScript1.Run then
ShowMessage(fsScript1.ErrorMsg);
end;


PS: Better place for such questions - our newsgroups, forum or
mail tech-support.

Saturday, December 17, 2005, 1:18:25 AM, you wrote:

MJW> This is directed to Michael Phillipenko at FastReports or anyone else
MJW> who can answer. I am evaluating scripting add-ons and downloaded the
MJW> FastScript demo code. There were some problems running the DB demo as
MJW> there are some errors and omissions in the installation instructions but
MJW> I managed to muddle through it (the paths in the instructions are not
MJW> correct and several other packages must be installed to make the DB demo
MJW> work).

MJW> My question is this: I use non-BDE components to connect to local
MJW> (.Dbase) tables, specifically Halcyon (tDataset compatible) and TXQuery
MJW> (for SQL capability). How can those components be made accessible to
MJW> FastScript? I dropped a HalcyonDataset component on the demo DB form
MJW> and modified the script to open the table similar to the TTable code but
MJW> running the script produced an error 'Unknown type THalcyonDatset' so I
MJW> assume there is some code that must be written to access it. As I have
MJW> only the demo version, I can't look at the component packages. I assume
MJW> it is possible to access TDataset compatible components but the question
MJW> is, how difficult is it to make these components accessible to the
MJW> script? I have no interest in using the BDE for accessing the data.

MJW> Mark J. Wallin, Ph.D.



--
Best regards,
Michael Philippenko mailto:michael (AT) fast-report (DOT) com
Fast Reports - cross-platform multi-language solutions for developers

http://www.fastexperts.com
http://www.fast-report.com

Back to top
Michael Philippenko
Guest





PostPosted: Mon Dec 19, 2005 12:47 pm    Post subject: Re[2]: FastScript question Reply with quote



Dear Mark J. Wallin!

....and use

HalcyonDataSet1.DataBasename

etc.

Monday, December 19, 2005, 3:41:45 PM, you wrote:

MP> Dear Mark J. Wallin!

MP> Try somethink like this:

MP> type
MP>  TForm1 = class(TForm)
MP>    HalcyonDataSet1: THalcyonDataSet;
MP>    DataSource1: TDataSource;
MP>    fsScript1: TfsScript;
MP>    fsPascal1: TfsPascal;
MP>    procedure FormCreate(Sender: TObject);
MP>  private
MP>    { Private declarations }
MP>  public
MP>    { Public declarations }
MP>  end;

MP> var
MP>  Form1: TForm1;

MP> implementation

MP> {$R *.dfm}

MP> procedure TForm1.FormCreate(Sender: TObject);
MP> begin
MP> fsScript1.Parent := fsGlobalUnit;
MP> fsScript1.AddClass(THalcyonDataSet,'THalcyonDataSet');
MP> fsScript1.AddObject('HalcyonDataSet1',HalcyonDataSet1);
MP> if not fsScript1.Run then
MP> ShowMessage(fsScript1.ErrorMsg);
MP> end;


MP> PS: Better place for such questions - our newsgroups, forum or
MP> mail tech-support.

MP> Saturday, December 17, 2005, 1:18:25 AM, you wrote:

MJW>> This is directed to Michael Phillipenko at FastReports or anyone else
MJW>> who can answer. I am evaluating scripting add-ons and downloaded the
MJW>> FastScript demo code. There were some problems running the DB demo as
MJW>> there are some errors and omissions in the installation instructions but
MJW>> I managed to muddle through it (the paths in the instructions are not
MJW>> correct and several other packages must be installed to make the DB demo
MJW>> work).

MJW>> My question is this: I use non-BDE components to connect to local
MJW>> (.Dbase) tables, specifically Halcyon (tDataset compatible) and TXQuery
MJW>> (for SQL capability). How can those components be made accessible to
MJW>> FastScript? I dropped a HalcyonDataset component on the demo DB form
MJW>> and modified the script to open the table similar to the TTable code but
MJW>> running the script produced an error 'Unknown type THalcyonDatset' so I
MJW>> assume there is some code that must be written to access it. As I have
MJW>> only the demo version, I can't look at the component packages. I assume
MJW>> it is possible to access TDataset compatible components but the question
MJW>> is, how difficult is it to make these components accessible to the
MJW>> script? I have no interest in using the BDE for accessing the data.

MJW>> Mark J. Wallin, Ph.D.






--
Best regards,
Michael Philippenko mailto:michael (AT) fast-report (DOT) com
Fast Reports - cross-platform multi-language solutions for developers

http://www.fastexperts.com
http://www.fast-report.com

Back to top
Mark J. Wallin
Guest





PostPosted: Mon Dec 19, 2005 7:46 pm    Post subject: Re: FastScript question Reply with quote

Michael Philippenko wrote:
Quote:
Dear Mark J. Wallin!

...and use

HalcyonDataSet1.DataBasename

etc.

Monday, December 19, 2005, 3:41:45 PM, you wrote:

MP> Dear Mark J. Wallin!

MP> Try somethink like this:

MP> type
MP> TForm1 = class(TForm)
MP> HalcyonDataSet1: THalcyonDataSet;
MP> DataSource1: TDataSource;
MP> fsScript1: TfsScript;
MP> fsPascal1: TfsPascal;
MP> procedure FormCreate(Sender: TObject);
MP> private
MP> { Private declarations }
MP> public
MP> { Public declarations }
MP> end;

MP> var
MP> Form1: TForm1;

MP> implementation

MP> {$R *.dfm}

MP> procedure TForm1.FormCreate(Sender: TObject);
MP> begin
MP> fsScript1.Parent := fsGlobalUnit;
MP> fsScript1.AddClass(THalcyonDataSet,'THalcyonDataSet');
MP> fsScript1.AddObject('HalcyonDataSet1',HalcyonDataSet1);
MP> if not fsScript1.Run then
MP> ShowMessage(fsScript1.ErrorMsg);
MP> end;


MP> PS: Better place for such questions - our newsgroups, forum or
MP> mail tech-support.

MP> Saturday, December 17, 2005, 1:18:25 AM, you wrote:

MJW>> This is directed to Michael Phillipenko at FastReports or anyone else
MJW>> who can answer. I am evaluating scripting add-ons and downloaded the
MJW>> FastScript demo code. There were some problems running the DB demo as
MJW>> there are some errors and omissions in the installation instructions but
MJW>> I managed to muddle through it (the paths in the instructions are not
MJW>> correct and several other packages must be installed to make the DB demo
MJW>> work).

MJW>> My question is this: I use non-BDE components to connect to local
MJW>> (.Dbase) tables, specifically Halcyon (tDataset compatible) and TXQuery
MJW>> (for SQL capability). How can those components be made accessible to
MJW>> FastScript? I dropped a HalcyonDataset component on the demo DB form
MJW>> and modified the script to open the table similar to the TTable code but
MJW>> running the script produced an error 'Unknown type THalcyonDatset' so I
MJW>> assume there is some code that must be written to access it. As I have
MJW>> only the demo version, I can't look at the component packages. I assume
MJW>> it is possible to access TDataset compatible components but the question
MJW>> is, how difficult is it to make these components accessible to the
MJW>> script? I have no interest in using the BDE for accessing the data.

MJW>> Mark J. Wallin, Ph.D.






Hi Michael,


I did as you suggested but am getting a stack overflow error and of
course I can't debug it with the demo version. I will post my code to
your newsgroup.

Thanks,
Mark J. Wallin, Ph.D.

Back to top
Mark J. Wallin
Guest





PostPosted: Mon Dec 19, 2005 10:09 pm    Post subject: Re: FastScript question Reply with quote

Hi Michael,

I found the problem; the suggested code
'fsScript1.AddObject('HalcyonDataSet1',HalcyonDataSet1);'
doesn't work because you apparently have to pass the ancestor class,
which in this case would be TDataset. Doing that eliminated the stack
overflow error. I got the idea from a message posted in the FastScript
forum. I was able to access the Halcyon component successfully. Thanks.

Mark J. Wallin, Ph.D.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.