Results 1 to 3 of 3

Thread: DF20 Breaking Changes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2019
    Location
    Australia
    Posts
    7

    Default DF20 Breaking Changes

    Hi DAW/All,

    Thought I'd just raise this here. We have been migrating various projects from prior version of DF (17.1, 18.0, 18.2, 19.1 etc) to DF 20.0 and have recently encountered some breaking changes that I've noticed in both these classes:
    cXmlHttpTransfer.pkg
    cJsonHttpTransfer.pkg

    In cXmlHttpTransfer.pkg (prior to DF20):
    Code:
            { Visibility=Private }
            Property Address paDataReceived 0                 // maintained by object
    In DF20:
    Code:
            { Visibility=Private }
            Property Pointer ppDataReceived 0                 // maintained by object
    In cJsonHttpTransfer.pkg (prior to DF20):
    Code:
            { Visibility=Private }
            Property Address paDataReceived 0                 // maintained by object
            
            { Visibility=Private }
            Property Integer piDataReceivedLength 0           // maintained by object
    In DF20:
    Code:
            { Visibility=Private }
            Property UChar[] pucDataReceived                 // maintained by object
    
            ***piDataReceivedLength removed*** 
    I will start by saying these don't appear to be documented properties that have changed, but nonetheless, the documentation for both these classes (within the internal code comments) doesn't appear to advise against accessing these properties or relying on them in subclasses. After all, the intention of OOP is to allow subclassing and overloading and these are common/shared libraries?

    To avoid a bunch of additional risk and testing, the simplest way has been to add #IF (!@ >= 200) or #IF (!@ < 200) compiler flags everywhere through our existing code and libraries.

    I have also noticed during upgrade of an old web app the following change:
    cBaseWebApp.pkg no longer exists in DF20, appears to be now renamed or replaced (closest class I could find) with cWebAppBasic.pkg?

    Other points I thought I'd mention:

    • Pointer is stated to be simply an alias for Address (the native data type according to DF20 and prior documentation), but it has been made obsolete in DF20. It is quite amusing as the function to obtain an Address (AddressOf), is also the function to obtain a Pointer, which now returns a Pointer rather than an Address. Do we expect this to change in future DF versions (e.g. PointerOf function that may break code)?
    • Have also noticed during upgrades errors for lack of PointToString function usage where previously (< DF20.0) you could move a Pointer/Address to a string and get this casted automatically (via Compiler or Runtime I assume?), is there any reason this behavior has changed in DF20 onwards - if the compiler sees it, why can't it optimise during compile/fix this?
    • Can no longer Move a string to a Address/Pointer, you must use MemCopy
    • Strings passed to a function (such as MemCopy) that requires Pointer/Address no longer accept a string variable, you must call AddressOf(string variable) for example - no longer casting during compile?
    • DF20 Compiler does not appear to be picking up lack of 'PointerToString' usage when calling Move to a struct property that is a string, this results in a runtime error (e.g. Move pPointer to SomeStruct.sString) Illegal Datatype Conversion.


    I hope the above can help someone else with their upgrades, and please feel free to add/contribute to any know gotchas with the introduction of DF20. Would love to hear back from DAW regarding the above changes
    Last edited by jason; 2-Mar-2022 at 11:12 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •