View Issue Details

IDProjectCategoryView StatusLast Update
0005976JEDI VCL00 JVCL Componentspublic2019-05-21 00:29
ReporterAriochAssigned To 
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0005976: procedure TJvDockServer.CreateDockPanelAndSplitter; - time to clean ?
Descriptionprocedure TJvDockServer.CreateDockPanelAndSplitter;

  function CreatePanel(AParent: TWinControl; Align: TAlign; Name: string): TJvDockPanel;
    if (FDockPanelClass <> nil) and
      (FDockPanelClass <> TJvDockPanelClass(ClassType)) then
      Result := FDockPanelClass.Create({Owner} Self);
      // (ahuser) Delphi 5's TComponent.Notification() will fail if Owner=Self.Owner
      Result.Parent := AParent; {ParentForm;}
Steps To Reproduce1: since Delphi 5 is no more supported, i think the workaround should be removed.
It would be natural to make panels owned by the form, not by dock server.

2: this lines just makes me pull my hair.
(FDockPanelClass <> TJvDockPanelClass(ClassType))

Self.Classtype should be TJvDockServer or descendant.
It can never be TJvDockPanelClass
So why that hackers method to disable type checking ?

Even if needed won't more clean approach be
   (TClass(FDockPanelClass) <> TClass(ClassType)) ?

But i still think that is to be just removed. It seems liek some ugly hack with hardly to determine reasoning.
TagsNo tags attached.



2013-01-15 15:27

administrator   ~0020355

Yes, seems like it, please provide a patch file for it.


2013-12-13 12:26

developer   ~0020812

won't have time before February and also the hackerish code is dangerous to touch.

perhaps postpone it and then carefully evaluate why all that weird typecasts were needed ?


2013-12-16 13:24

administrator   ~0020864

Take your time, there is no hurry


2019-05-20 21:26

reporter   ~0021846

Any news on that one?


2019-05-21 00:29

developer   ~0021848

Last edited: 2019-05-21 00:31

i no more use Delphi 5 and no one picked the challenge when i quit

frankly, it is looooong time that Delphi does not support D5/BCB5

w.r.t. #2 - the "TJvDockPanelClass(ClassType)" is unsafe typecase, with about the same semantics as would be "pointer(ClassType)" or "integer(ClassType)".

unless Delphi (FPC?) optimizing compiler can totally remove this comparison, "evaluating" in compile-time basing upon data types alone, like it would remove "cardinal-var < 0" comparisons, the data type to me seemsdoing nothing at all.

w.r.t. 0000001 - i kind of thinkn that whatever be made wit hthe comment - the ahuser's comment better remain. It is of those pieces of knowledge that you only get when they byte you from behind, and because of that might be worth keeping despite D5 unsupported

Issue History

Date Modified Username Field Change
2012-08-31 17:44 Arioch New Issue
2013-01-15 15:27 obones Note Added: 0020355
2013-01-15 15:27 obones Status new => feedback
2013-12-13 11:16 obones Status feedback => acknowledged
2013-12-13 12:26 Arioch Note Added: 0020812
2013-12-16 13:24 obones Note Added: 0020864
2013-12-16 13:24 obones Status acknowledged => feedback
2014-12-04 16:34 obones Status feedback => acknowledged
2019-05-20 21:26 mh Note Added: 0021846
2019-05-21 00:29 Arioch Note Added: 0021848
2019-05-21 00:31 Arioch Note Edited: 0021848