Open KatieWoe opened 1 month ago
This error is related to these ObservableArrays in NumberPairsSceneModel:
public readonly leftAddendObjects: ObservableArray<CountingObject>;
public readonly rightAddendObjects: ObservableArray<CountingObject>;
The stack trace indicates that this is failing at Emitter line 61:
// Although this is not the idiomatic pattern (since it is guarded in the phetioStartEvent), this function is
// called so many times that it is worth the optimization for PhET brand.
Tandem.PHET_IO_ENABLED && this.isPhetioInstrumented() && this.phetioStartEvent( 'emitted', {
61 data: this.getPhetioData( ...args )
} );
The ObservableArrays are indeed instrumented. But perhaps there's something in ObservableArray or Emitter that requires the elements of the array (CountingObject
instances, in this case) to also be instrumented?
Yes, it looks the elements of an ObservableArray also need to be instrumented.
@marlitas Below is a patch that instruments CountingObject
. Note this temporary line of code in CountingObject.ts:
phetioState: false // until CountingObject has some state
Also noting that I did not commit this because I immediately hit other PhET-iO problems in Studio of the "required tandems must be supplied" variety.
I am going to disable phet-io state testing on CT until more work has been done in this sim. It's not at a good place to be playing whac-a-mole with any state wrappers right now, nor is it worth it until more work has been done. I'll make sure that I am testing phet-io brand to ensure tandems are supplied as needed to address some of the required tandems must be supplied
errors @pixelzoom was encountering.
I have added in all the necessary tandems for the sim. I am going to close this issue as it is now covered by #12