Difference between observeField and observeFieldScoped ?
Hi all,
I'm looking for clarification on what the difference is between observeField and observeFieldScoped on ifSGNodeField. The documentation (https://developer.roku.com/en-gb/docs/references/brightscript/interfaces/ifsgnodefield.md#observefieldfieldname-as-string-functionname-as-string--infofields-as-object-as-boolean) doesn't seem to describe the difference, as the callback for both is expected to be in the receiving component. In my testing, they both worked like this, seemingly identically. Does anyone know?
As far as I understand it, the difference is when we come to unobserve.
If we observeFieldScoped then unobserveFieldScoped we won't remove other observers (i.e. from another component) - but if we observeField then unobserveField we'll clear out every other observer too.
I tend to use the 'scoped' versions everywhere.
Watching this thread in case I'm wrong, that'd be good to know!