Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005153 [JEDI VCL] 02 Installation block always 2010-02-04 23:31 2011-06-10 16:09
Reporter Cyrus View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0005153: SVN revision 12688 : Installation fails with errors at file JvDockControlForm.pas
Description Delphi 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.
  
Additional Information
Tags Delphi 7.0
Attached Files

- Relationships

-  Notes
(0017189)
obones (administrator)
2010-02-07 17:05

This is now in SVN

- Issue History
Date Modified Username Field Change
2010-02-04 23:31 Cyrus New Issue
2010-02-04 23:31 Cyrus Issue Monitored: Cyrus
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker