"EnTerr" wrote:
ifSourceIdentity supposedly applies to roChannelStore, roChannelStoreEvent and roUrlEvent. It lists a method SetSourceIdentity(int) but i cannot make that work - instead i get error:
BrightScript Debugger> ? st.setSourceIdentity(8)
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(477)
Who allows it and what's the purpose of using it?
This is both a interface design lacking and a bug.
The design lacking is that there are cases where a component implements a named interface, but not all of the functions defined by that interface.
In some cases this is because an interface defines both getter and setter methods, but a particular component that references that interface may only implement getter methods.
The purpose would be that you can match up events with the object that generated them.
I.e. you should be able to match roChannelStoreEvent objects' GetSourceIdentity() value with the generating roChannelStore object's GetSourceIdentity() value.
The roChannelStore object automatically assigns itself a source identify value. (Although the current implementation has some issues that may make this unreliable).
Similarly you should be able to match roUrlEvent objects' GetSourceIdentity() value with the generating roUrlTransfer object's GetIdentity() value.
The roUrlTransfer object automatically assigns itself an identity value.
It appears to me that SetSourceIdentity() does not have any functional application exposure currently.