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.

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.

2 participants