Possibly an answer to two question in
one:
First,
I assume you shouldnt pass the Dataset name, pass the Dataset object
(TDataset) - which is just a pointer anyway.
Regarding the variables thing the ideal is to write
code that is self documenting and as self contained as possible. A procedure
that depends on a global variable to operate correctly requires someone to
explain that fact, and is less portable (what say that global variable has a
different name in another program?). That said, class methods often rely on form
level variables - but they are always part of the class that has these variables
so, again, things are self contained.
Avoid
using global variables, but not too an extreme. Often you'll want to, say,
remember the state of a grid (edited/ not edited) and a procedure will need to
chck out this global variable to, say, disable/enable buttons ... thats fair
enough. But make sure its easy to follow - the variables are clearly named etc.
[James Low] -----Original Message----- From: Mark Howard [mailto:[EMAIL PROTECTED]] Sent: 3 May 2001 09:51 To: Multiple recipients of list delphi Subject: [DUG]: Passing DataSet to Quick Report
|
- [DUG]: Passing DataSet to Quick Report Mark Howard
- [DUG]: Dialup Networking Sandeep
- Re: [DUG]: Passing DataSet to Quick Report James Low
- Re: [DUG]: Passing DataSet to Quick Report Mark Howard
- RE: [DUG]: Passing DataSet to Quick Report James Low
- Re: [DUG]: Passing DataSet to Quick Report Mark Howard
- RE: [DUG]: Passing DataSet to Quick Report James Low
- Re: [DUG]: Passing DataSet to Quick Report Mark Howard
- Re: [DUG]: Passing DataSet to Quick Report Nello Sestini
- RE: [DUG]: Passing DataSet to Quick Report James Low
- Re: [DUG]: Passing DataSet to Quick Report Mark Howard