Skip to content

Conversation

@ehennestad
Copy link
Collaborator

This pull request updates the event notification system in the Schema class to provide more context when property values change, especially for linked and non-linked properties. The main improvement is the addition of the IsPropertyOf field to the PropertyValueChangedEventData class, which tracks the specific object instance associated with a property change event. This allows event listeners to better identify the source of changes, particularly when dealing with arrays of objects or linked properties.

Event Notification Improvements

  • Added the IsPropertyOf field to the PropertyValueChangedEventData class and updated its constructor to accept the relevant object instance. This provides more context for event listeners about which object triggered the property change.
  • Updated all event notification calls in Schema.m to include the object instance as the IsPropertyOf parameter when creating PropertyValueChangedEventData, for both linked and non-linked properties. [1] [2] [3]

Handling Array and Subset Indexing

  • Improved logic for determining the event source when modifying properties of arrays of objects. Now, the correct instance is identified and used as the event source, ensuring notifications are sent from the appropriate object.
  • Enhanced the isSubsForPublicPropertyValue method to correctly handle subset indexing and dot-indexing, ensuring accurate identification of public property changes even when operating on subsets of objects.

Pass the object instance to PropertyValueChangedEventData for more accurate event source tracking. Enhance isSubsForPublicPropertyValue to correctly handle subsref indexing into object arrays and improve public property detection logic.
@ehennestad ehennestad enabled auto-merge (squash) November 7, 2025 11:55
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Test Results (R2021b)

558 tests  ±0   558 ✅ ±0   1m 27s ⏱️ -17s
 16 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2a8980a. ± Comparison against base commit e155dc2.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Test Results (R2024b)

558 tests  ±0   558 ✅ ±0   1m 33s ⏱️ -2s
 16 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2a8980a. ± Comparison against base commit e155dc2.

@ehennestad ehennestad merged commit db55dea into main Nov 7, 2025
6 checks passed
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.55%. Comparing base (e155dc2) to head (2a8980a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
code/internal/+openminds/+abstract/Schema.m 70.58% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   75.58%   75.55%   -0.04%     
==========================================
  Files         344      344              
  Lines        3695     3706      +11     
==========================================
+ Hits         2793     2800       +7     
- Misses        902      906       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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