Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005976 [JEDI VCL] 00 JVCL Components minor always 2012-08-31 17:44 2019-05-21 00:29
Reporter Arioch View Status public  
Assigned To
Priority normal Resolution open Platform
Status acknowledged   OS
Projection none   OS Version
ETA none Fixed in Version Product Version
  Target Version Product Build
Summary 0005976: procedure TJvDockServer.CreateDockPanelAndSplitter; - time to clean ?
Description procedure 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 Reproduce 1: 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.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
obones (administrator)
2013-01-15 15:27

Yes, seems like it, please provide a patch file for it.
Arioch (developer)
2013-12-13 12:26

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 ?
obones (administrator)
2013-12-16 13:24

Take your time, there is no hurry
mh (reporter)
2019-05-20 21:26

Any news on that one?
Arioch (developer)
2019-05-21 00:29
edited on: 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

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