Skip to content

Conversation

@Irwin1985
Copy link
Contributor

Hi Team,

In this PR I have implemented the first version of AMEMBERS() function.

Implementation details:

  • Scope: Supports Native X# Objects.
  • Modes: Implements nArrayContentsID modes 0 (1D Array, Names only) and 1 (2D Array, Name + Type).
  • Reflection: Uses .NET Reflection to discover Properties, Methods, Fields, and Events.
  • Output: Returns uppercase member names, sorted alphabetically, consistent with VFP behavior.
  • Handling: Correctly handles __FoxArray resizing for both 1D and 2D results.

Limitations (Phase 2):

  • COM Objects: nArrayContentsID = 3 is not yet implemented.
  • Filters: cFlags filtering (e.g., distinguishing "Native" vs "User Defined") is currently ignored (returns all public members)

Tests:

  • Added AMembersTests.prg in the test project.
  • Verified functionality using a test class with properties, method, and events.
  • Validated array structure using ASubscript() logic for 2D navigation.

@RobertvanderHulst RobertvanderHulst merged commit 6caf32e into dev Jan 12, 2026
1 check passed
RobertvanderHulst added a commit that referenced this pull request Jan 12, 2026
* [Compiler tests] Added C951 for #1742 and adjusted C950 for #1764

* More fixes for #1764

* [Vsintegration] Add commands for Target Framework selection in Debug Start button

* [Vsintegration] Remove IsVS15 check

* Add check for output == null

* [Vsintegration] Add support for TargetFramework and TargetFrameworks field on General property page for SDK and normal projects

* Added some strings for General Property Page

* [Compiler tests] Small adjustments and marked fixed tests

* [Compiler tests] Adjusted C427 (using LOGIC PTR in __FormattedText) to use the same adjusted code for X# that the X# SDK uses

* [Vsintegration] Several changes to work with multiple targetFrameworks

* VFP Runtime: Implemented AMEMBERS() for native objects (nInfo 0 and 1) (#1783)

* Added new Templates for SDK-Style (#1784)

Recreated all templates items and projects for dotnet new and Visual Studio

---------

Co-authored-by: cpyrgas <chris@xsharp.eu>
Co-authored-by: Irwin <rodriguez.irwin@gmail.com>
Co-authored-by: Fabrice Foray <fforay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants