Jump to content

Converting a Lazarus/Delphi library


Recommended Posts

With the help of Jarto and a few here I have almost 5000 lines of a Lazarus/Delphi library that implements a mature custom TCP protocol compiling with SMS with just a few {$IFDEF DWSCRIPT}'s required so far.  I have about 1000 more line to go before I can give it a full test but I do have a Websocket connected to the library and have sent messages to the library from a Lazarus program and it received and decoded them correctly.  I was only working on it for a few hours on and off yesterday so I am amazed and very happy.  Hopefully it will all run correctly in the end but at least the compiler thinks it should.

The key websites that have helped me get handle on thing are here but so far I have not used them directly, SMS has handled everything in the compile so far but I do have a few dynamic byte array that I need to mimic which will need this information....

https://jonlennartaasenden.wordpress.com/2017/06/04/smart-pascal-memory-and-pointers/

https://jonlennartaasenden.wordpress.com/2015/03/07/system-interop-how-to-for-smart-mobile-studio/

https://www.html5rocks.com/en/tutorials/webgl/typed_arrays/

The ultimate goal is to create phone apps 

Jim

Link to post
Share on other sites
  • 2 weeks later...

Update:  While doing the conversion it was clear my library sucked so I spent this week refactoring it.  I now have it converted over and it compiles with SMS with less than a half a dozen DWSCRIPT defines..... Unfortunately some of the logic is not converting to javascript correctly so I need to debug and understand what is not working correctly in the JS....

 

Jim

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...