BugFixes, Extended RTTIExposer and extended TimeFunctions

Issue #213 resolved
Alex Bespalov created an issue

Have no permission to make pull request, so make it in fork.

https://bitbucket.org/Vizit0r/dwscript-for-pulling-to-main-repo/commits/7ce06115b6de2fa2d1590d917ef42ac4b597ae1a

Commit description:

1 dwsComp.pas : fixed bug when using function declaring like

FDWSUnitImport.Functions.Add('function WeeksBetween(const ANow, AThen: Float): Integer;');
with Name parsing for Unit, and then overriding function Result with empty string (default param value in "Add" method)

2 Extended RTTIExposer (dyn arrays, class indexed properties, sets, overloads for constructors, and more.)

3 Small extension for TimeFunctions - added all IncXXX methods (and removed unused 3rd param, no sense to have it there).

Later on will expand RTTIExposer.

Comments (6)

  1. Eric Grange repo owner

    Thanks, I will add test cases for the new IncXxxx functions.

    Would you have any RTTIExposer tests or have a look at restoring URTTIExposeTests ? Those have fallen in disrepair (we are not using the RTTI features here as most of the VCL/RTL is not “safe” to expose to potential scripting abuse)

  2. Alex Bespalov reporter

    Tomorrow will arrange for you test cases from working methods, today have no time for PC.

  3. Alex Bespalov reporter

    regarding your questions:

    Would you have any RTTIExposer tests or have a look at restoring URTTIExposeTests ?

    I make no any tests here and have no idea how to do this, use folder “Test” and some sort of help info only :)

    we are not using the RTTI features here as most of the VCL/RTL is not “safe” to expose to potential scripting abuse

    I’m using RRTI only for easy access to typed data. VCL not interesting at all - DWS works in thread as non-gui script engine.

    So, about tests:

    file with tests here:https://easyupload.io/aj20vg

  4. Log in to comment