View Issue Details

IDProjectCategoryView StatusLast Update
0005153JEDI VCL02 Installationpublic2011-06-10 16:09
ReporterCyrusAssigned Toobones 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.40 
Summary0005153: SVN revision 12688 : Installation fails with errors at file JvDockControlForm.pas
DescriptionDelphi 7.0 with updates applied.

These are error messages:
.\jvcl\run\JvDockControlForm.pas(1536) Error: Undeclared identifier: 'DockManager'
.\jvcl\run\JvDockControlForm.pas(1536) Error: Missing operator or semicolon
.\jvcl\run\JvDockAdvTree.pas(120) Fatal: Could not compile used unit 'JvDockControlForm'

Excerpt from JvDockControlForm.pas :

function ManualTabDock(DockSite: TWinControl; Form1, Form2: TForm): TJvDockTabHostForm;
var
 DockClient:TJvDockClient;
 fm:TForm;
begin
  { This is an initial sanity check, but the actual DockClient is required later,
    so we can find the tab host form that contains it. }
  DockClient := FindDockClient(Form1);
  if not Assigned(DockClient) then
      raise EInvalidOperation.Create('ManualTabDock:DockClient not found. Form you are trying to dock must have a dock style');

  { This should create the tab host form, if the docking style supports tabbed docking,
     as all 'advanced' docking styles provided in the JVCL do provide.

     This is the same call used when you drag something with your mouse, so it
     is much more reliable, and consistent, and updates the DOckManager state
     which prevents all manner of weird problems.
    }
  // Cyrus : This line throws error when compiling
  DockSite.DockManager.InsertControl(Form2,alClient,Form1);

According to Delphi 7.0 help documentation, TWinControl does have DockManager property but it is protected member.

Solution:

Type
  TMyWinControl = class(Controls.TWinControl)
    public
      property DockManager;
  End;

{ Quick way to do tabbed docking programmatically - this way only works if your
dock style is written to accept InsertControl calls of this type, and generate
tab hosts. Rewritten January 21, 2010. WPostma }
function ManualTabDock(DockSite: TWinControl; Form1, Form2: TForm): TJvDockTabHostForm;
var
 DockClient:TJvDockClient;
 fm:TForm;
begin
  { This is an initial sanity check, but the actual DockClient is required later,
    so we can find the tab host form that contains it. }
  DockClient := FindDockClient(Form1);
  if not Assigned(DockClient) then
      raise EInvalidOperation.Create('ManualTabDock:DockClient not found. Form you are trying to dock must have a dock style');

  { This should create the tab host form, if the docking style supports tabbed docking,
     as all 'advanced' docking styles provided in the JVCL do provide.

     This is the same call used when you drag something with your mouse, so it
     is much more reliable, and consistent, and updates the DOckManager state
     which prevents all manner of weird problems.
    }
  TMyWinControl(DockSite).DockManager.InsertControl(Form2,alClient,Form1);

I don't know if this solution causes bugs at runtime.
  
TagsDelphi 7.0

Activities

obones

2010-02-07 17:05

administrator   ~0017189

This is now in SVN

Issue History

Date Modified Username Field Change
2010-02-04 23:31 Cyrus New Issue
2010-02-04 23:32 Cyrus Tag Attached: Delphi 7.0
2010-02-07 17:05 obones Note Added: 0017189
2010-02-07 17:05 obones Status new => resolved
2010-02-07 17:05 obones Fixed in Version => Daily / SVN
2010-02-07 17:05 obones Resolution open => fixed
2010-02-07 17:05 obones Assigned To => obones
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40