Agreed, as long as we are only discussing the registering of OLE events. When interacting with properties or calling methods, we consider prepending with "OLE." to be best practice.
We tried using only the eventname but then the PosChanged event didn't com through, maybe because PosChanged is also used with OI controls. We now register with "OLE." and now all events can be handled.
Ooh, thanks for catching the oversight. SRP Schedule events were added to that page.
I use the OLE prefix as a best practice by habit to avoid conflicts. You never know if OI will add something later that will conflict with one of our names. I didn't use the prefix in the new document because I didn't have any code examples. Rest assured, though, I use OLE when I qualify events for the very reason you just mentioned.
as long as we are only discussing the registering of OLE events. When interacting with properties or calling methods, we consider prepending with "OLE." to be best practice.
That be what I mean, Yes. :)
We tried using only the eventname but then the PosChanged event didn't com through
Maybe that's why I never had an issue. Haven't used "PosChanged" since implementing the SRP Edittable. I always seem to find that other events are more suitable to any requirements, most often "PosChanging". Once we had access to that, PosChanged always felt like putting the cart before the horse.
You never know if OI will add something later that will conflict with one of our names
That's a good point. Having never had an issue, it hadn't occurred to me that there was potential for a conflict.
Comments
Just use the eventname.
Agreed, as long as we are only discussing the registering of OLE events. When interacting with properties or calling methods, we consider prepending with "OLE." to be best practice.
We now register with "OLE." and now all events can be handled.
I use the OLE prefix as a best practice by habit to avoid conflicts. You never know if OI will add something later that will conflict with one of our names. I didn't use the prefix in the new document because I didn't have any code examples. Rest assured, though, I use OLE when I qualify events for the very reason you just mentioned.
Once we had access to that, PosChanged always felt like putting the cart before the horse.
Having never had an issue, it hadn't occurred to me that there was potential for a conflict.