Re: Anything like this for Delphi?
- From: Aleksander Oven <aleksander.oven@xxxxxxxx>
- Date: Mon, 31 Dec 2007 11:56:33 +0100
I don't know or use the JVCL docking library personally, but I believe
there's no need to use a datamodule /just/ to avoid using the form's
unit. You simply need to write a little bit of code to create a layer
of indirection:
#1. Create a new unit with a singleton class, and give it a new
read/write property of type TJvDockStyle.
#2. Use this unit from the main form's and the client forms' units.
#3. In main form's constructor, assign the JvDockStyle to the
singleton's property.
#4. In client forms' constructors read the singleton's property
and assign it to the appropriate property of the JvDockClient.
This way, MainFormUnit.pas and ClientFormUnit.pas don't use each other,
but they both use StyleSingleton.pas.
If you want to, you can make this more elegant by declaring and
implementing two interfaces in the singleton - one for read access and
one for write access to the singleton's property.
The latter would then only be accessible to the main form, and the
former only to client forms.
--
Regards,
Aleksander Oven
.
- References:
- Anything like this for Delphi?
- From: Tony Caduto
- Re: Anything like this for Delphi?
- From: Liz
- Re: Anything like this for Delphi?
- From: Tony Caduto
- Re: Anything like this for Delphi?
- From: Andreas Hausladen
- Re: Anything like this for Delphi?
- From: Robert
- Re: Anything like this for Delphi?
- From: Andreas Hausladen
- Re: Anything like this for Delphi?
- From: yannis
- Anything like this for Delphi?
- Prev by Date: Re: Zip component for .zip, .rar, .7zip, etc.
- Next by Date: Re: Zip component for .zip, .rar, .7zip, etc.
- Previous by thread: Re: Anything like this for Delphi?
- Next by thread: Re: Anything like this for Delphi?
- Index(es):
Relevant Pages
|