Changing *ANYTHING* in the interface section will change the package
sufficiently to require a recompile of the application.  This is true as
long as the package is statically bound to the EXE - even if you use
interfaces.

To get around this problem, you will need to dynamically load your packages,
and use a registry (something like RegisterClass) to "hook" into the EXE.
Ie, in the initialization section of one of the units, call methods to
register the classes the package implements.  You will also need an
"interface" (either Delphi vtable interface or abstract base classes) and
the classes you registered must support the interface.

Regards,
Dennis.

> Changing private variables would be included in this due to
> the way Delphi
> accesses properties.
>
> Have a look at the compiled code. If you specify a property
> xa: Boolean read
> fxa; then Delphi directly accesses the private variable "fxa"
> by offset from
> the start of the object, so changing anything in the object
> "could" cause
> this to fail.
>
> Also adding procedures/functions to the private section could
> change the
> virtual call table, so again would cause this to fail.
>
> ie Any change in the "Interface" would have an effect - this
> is one case
> where real "privates" would be nice - a case of Delphi being to
> "Smart"/optimal - there is always some trade off.
>
> The only way to get what you want in this case would be to use COM
> Interfaces, this way the Viable does not change - Unless you
> manually change
> the DISPID, in which case you are just asking for trouble.
>
> > -----Original Message-----
> > From:       Kerry Sainsbury [SMTP:[EMAIL PROTECTED]]
> > Sent:       Friday, September 03, 1999 11:09 AM
> > To: Multiple recipients of list delphi
> > Subject:    RE: [DUG]:  Forms from DLLs
> >
> > --- Dennis Chuah <[EMAIL PROTECTED]> wrote:
> > >
> > > Only if you have changed the interface section of any of
> the units.
> >
> > That wasn't my impression. In my experience it was just a
> bloody great
> > pain in the butt.
> >
> > I wonder if adding or altering private variables is included in the
> > definition of "changing the interface section".
> >
> > I haven't gone looking for the cause of the problem exhaustively.
> > People should just be aware that it isn't all roses.
> >
> > > > Just be warned that when you change a packages, you
> really need to
> > > > recompile both the package *and* the application that uses
> > > > the package.
> > > >
> > > > This may, or may not, become a pain in the butt for you.
> > > >
> > > > Kerry S
> > > >
> > > > --- Myles Penlington <[EMAIL PROTECTED]> wrote:
> > > > > Is this one? of the reasons Borland invented the DPL/BPL
> > > libraries
> > > > > which is
> > > > > a superset of the DLL for Delphi use??
> > > > > And perhaps we should be using the DPL/BPL instead
> (and hence get
> > > > > around
> > > > > these kind of problems)?
> > > > > Myles.
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From:       Carl Reynolds [SMTP:[EMAIL PROTECTED]]
> > > > > > Sent:       Thursday, September 02, 1999 1:30 PM
> > > > > > To: Multiple recipients of list delphi
> > > > > > Subject:    RE: [DUG]:  Forms from DLLs
> > > > > >
> > > > > > Yeah, if I remove ShareMem from my uses clauses,
> funnily enough
> > > my
> > > > > test
> > > > > > program doesn't work anymore either - with the same
> problem as
> > > > > first
> > > > > > mentioned!  Rohit, I'm presuming you don't need a copy of it
> > > > > anymore.
> > > > > >
> > > > > > My guess is if there are any TStringFields, which use
> > > > long strings,
> > > > > in
> > > > > > your table data, that alone would be sufficient to
> > > > require ShareMem
> > > > > in the
> > > > > > program.
> > > > > >
> > > > > > I ran into a curious problem while I was mucking
> around anyway.
> > >  I
> > > > > have no
> > > > > > problem creating an instance of the DLL form, displaying it,
> > > and
> > > > > joining
> > > > > > it to the dataset on the calling program's main
> form.  But when
> > > I
> > > > > try to
> > > > > > set the parent property of the DLL form to a
> tabsheet of a page
> > > > > control,
> > > > > > the DLL form just disappears (doesn't appear on the
> > > > tabsheet) and I
> > > > > get an
> > > > > > exception when the program finishes.  The same code
> works when
> > > I
> > > > > choose
> > > > > > any other form to place on the tabsheet except the
> one from the
> > > > > DLL.  Do
> > > > > > you have to do something special to get that to work?
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Carl Reynolds                      Ph: +64-9-4154790
> > > > > > CJN Technologies Ltd.             Fax: +64-9-4154791
> > > > > > [EMAIL PROTECTED]                DDI: +64-9-4154795
> > > > > > PO Box 302-278, North Harbour, Auckland, New Zealand
> > > > > > 12 Piermark Drive, North Harbour Estate, Auckland, NZ
> > > > > > Visit our website at http://www.cjntech.co.nz/
> > > > > >
> > > >
> > > >
> > > > _______________________________________________________________
> > > > Do You Yahoo!?
> > > > Get your free @yahoo.com.au address at http://mail.yahoo.com.au
> > > > or your free @yahoo.co.nz address at http://mail.yahoo.co.nz
> > > >
> > > > --------------------------------------------------------------
> > > > -------------
> > > >     New Zealand Delphi Users group - Delphi List -
> > > > [EMAIL PROTECTED]
> > > >                   Website: http://www.delphi.org.nz
> > > >
> > >
> >
> --------------------------------------------------------------
> ------------
> > -
> > >     New Zealand Delphi Users group - Delphi List -
> > > [EMAIL PROTECTED]
> > >                   Website: http://www.delphi.org.nz
> > >
> > >
> >
> > ===
> > -- Systems Engineer, Inprise NZ. [EMAIL PROTECTED]
> > _______________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com.au address at http://mail.yahoo.com.au
> > or your free @yahoo.co.nz address at http://mail.yahoo.co.nz
> >
> >
> --------------------------------------------------------------
> ------------
> > -
> >     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to