Hello guys, i have a custom component with a event handler that has a const Array [TSomeEnumeration] of string

Hello guys, i have a custom component with a event handler that has a const Array [TSomeEnumeration] of string

On 10 Seattle, when I assign an event handler at design time (double click from inspector) the generated code attaches a [Ref] attribute just after my const keyword

The docwiki states that "is used to qualify constant function parameters so that they are passed by reference (not by value) to the function"

Please, explain me. Is this any new kind of compiler magic? I have a bunch of those events handlers that were coded Pre-10 Seattle and they still work fine withouth the Ref attrbute. Also, the component's event handlers type declarations weren't changed.

What should i do? Start adding [Ref] where is missing? Are there any side effects? AFAIK this is for optimization (not copying the entire array). I can't really understand how the code is able to compile two different event types. I can't really see whats happening under the hood

Comments