Ian Branch 127 Posted November 29, 2022 (edited) Hi Team, Has anybody brought TPVP into the 21st century? 😉 I have downloaded it from SF and am trying to get it loaded under D11.2. Regards & TIA, Ian Edited November 29, 2022 by Ian Branch Share this post Link to post
FPiette 383 Posted November 29, 2022 36 minutes ago, Ian Branch said: Has anybody brought TPVP into the 21st century? 😉 I have downloaded it from SF and am trying to get it loaded under D11.2. And which are the issue you have? Compilation errors? Compile but doesn't run? Share this post Link to post
Ian Branch 127 Posted November 29, 2022 (edited) I didn't want to get into the innards if it has already been sorted. Having said that, I am trying to build and install the .bpl under D11.2. I get an incompatible types error here.. {==TVpMemoryStream===================================================} procedure TVpMemoryStream.SetPointer(Ptr : Pointer; Size : Integer); begin Assert(not Assigned(Memory)); inherited; <<< end; I don't know/understand enough to know what to do here. Ian Edited November 29, 2022 by Ian Branch Share this post Link to post
Lajos Juhász 293 Posted November 29, 2022 You should at least provide a compiler error message. From here we don't know which class it's inherited from.  I don't like to gamble but will make an exception my guess is that you should change the parameters of the method to match the signature from the parent class? Share this post Link to post
Ian Branch 127 Posted November 29, 2022 (edited) [dcc32 Error] VpXBase.pas(655): E2008 Incompatible types  The procedure is derived from this.. {The TVpMemoryStream class is used to expose TMemoryStream's SetPointer method.} TVpMemoryStream = class(TMemoryStream) public procedure SetPointer(Ptr : Pointer; Size : Longint); end;  Edited November 29, 2022 by Ian Branch Share this post Link to post
Lajos Juhász 293 Posted November 29, 2022 At least I won this bet. You should always post the parent class as don't everyone will have the complete source. By openning the System.Classes.pas it's clear what to do:  procedure TCustomMemoryStream.SetPointer(Ptr: Pointer; const Size: NativeInt);  change the method signature to match. Share this post Link to post
Ian Branch 127 Posted November 29, 2022 OK. Tks. That sorted it. Not used to the idea of diving in to the core classes. All OK there Tks. Moving on to the next error. I should be able to resolve this one. 🙂 Share this post Link to post
Ian Branch 127 Posted November 29, 2022 (edited) Hi Guys, OK, got a pile of little issues sorted. Got this error.. "[dcc32 Error] VpBaseDS.pas(1232): E2017 Pointer type required" For this.. procedure TVpControlLink.ReleaseDependents; var I : Integer; begin for I := 0 to pred(DependentList.Count) do Detach(TVpDependentInfo(DependentList.List^[I]).Component); end; With the cursor sitting between the ^ and [. I suspect this is a Delphi language change issue.  There are a number of these TVpDependentInfo(DependentList.List^[I]).Component related errors.  TVDependantInfo is declared as.. TVpDependentInfo = class { Used by the ControlLink component } protected{private} FComponent: Pointer; FEventHandler: TVpControlNotifyEvent; public property Component: Pointer read FComponent write FComponent; property EventHandler: TVpControlNotifyEvent read FEventHandler write FEventHandler; end;  DependentList is a TList.  Ian Edited November 29, 2022 by Ian Branch Share this post Link to post
Ian Branch 127 Posted November 29, 2022  I changed TVpDependentInfo(DependentList.List^[I]).Component to TVpDependentInfo(DependentList.Items[I]).Component and it seems to like it. We'll see. Next issue.. Share this post Link to post
omnibrain 15 Posted November 29, 2022 Are you going to put it on github? Share this post Link to post
Ian Branch 127 Posted November 29, 2022 If I ever get it working.. 🙂 1 Share this post Link to post
Fr0sT.Brutal 900 Posted November 29, 2022 Are you aware Lazarus team has newer fork? https://wiki.freepascal.org/Turbopower_Visual_PlanIt Share this post Link to post
Ian Branch 127 Posted November 29, 2022 No, I wasn't aware. Is there much involved in porting Lazarus/FreePascal to Delphi?? Share this post Link to post
Ian Branch 127 Posted November 29, 2022 OK. I downloaded and had a look at the Lazarus implementation. I also had a look at various Lazarus/Delphi conversion guides. As I have the original almost working now I don't think I want to tackle the Lazarus/Delphi conversion. Share this post Link to post
Fr0sT.Brutal 900 Posted November 30, 2022 Okay, I just thought Lazarus version could have got some updates and improvements. Â TurboPower was an amazing company, they had so much open source components with great docs, and many of them are still actual, >10 years after abandonment! Share this post Link to post
Ian Branch 127 Posted November 30, 2022 I suspect it does, it has a later version #. Maybe I will look at it once I get this little exercise over. Share this post Link to post