Jump to content
Sign in to follow this  
Incus J

Installing EmbeddedWb package in Delphi 10.4

Recommended Posts

I'm trying to install a package EmbeddedWebBrowser_Tokyo.bpl in Delphi 10.4 which contains the following procedure:

procedure TIEParser.Stop;
begin
  if Assigned(Doc) then
    Doc := nil;
  if Assigned(All) then
    All := nil;
  FreeAndNil(Element);
  FUrl := EmptyStr;
  FBusy := False;
  Finalize;
end;

When Building I get a compiler error at FreeAndNil(Element).  Incompatible types: TObject and TElementInfo.

This makes sense in that Element is a TElementInfo, which is a record, not a TObject.

 

That suggests FreeAndNil may be the wrong thing to use here - but what could I use instead?  (not being sure exactly what the author's intention is).

 

I realise _Tokyo indicates the package is for an older release, but it is the most up to date version of the package I can find at present.

I had it installed and working OK in Delphi 10.3 - so hopefully I just need to tweak a couple of things?

Share this post


Link to post

I just had a glimpse over the source but I think the line can just be removed. There is nothing to deallocate and any managed fields in the record will be finalized automatically from the RTL.

Share this post


Link to post

Thank you Stefan - I'll try commenting out the line and see what happens.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×