Posted: 15 Mar 2018 8:24 EDT Last activity: 23 Aug 2018 19:06 EDT
Pega Robotics : Difference between Create Type Extension & Create Component Extension
After interrogating Windows applications controls in the object Explorer when we right click on the control there are two options ("Create Type Extension" & "Create Component Extension" ) available to create Extensions for the selected control. When clicked on these options a script component is being created in Solution Explorer(In Extensions Section).
What are the purpose of extensions & in which scenarios we choose them?
Are these extensions related to Translators & UI Connectors?
what kind of functionalities we can implement through C# script to apply on the interrogated controls?
I will try to answer some of your basic points, however I do not have an example handy that I can upload. Basically, a Type Extension applies to the type of object. For example; if you wanted to add a new method to the StringUtils component, you could create a Type Extension, and all StringUtils components in your solution would have this new method (or property or event). A Component Extension will only apply to that specific instance of a component. This might be useful for a particular control within an application where you want to add a method to evaluate its contents and return something about it. I have not really found a great use case for a Component Extension, as it is less flexible, but functionally identical.
In terms of how these relate to translators and UI Connectors; they don't really relate directly.
You can do pretty much whatever you want to a given control if you are adept enough at C#. For example; the CredentialStore component doesn't have a delete method. You could add one to it using an extension. StringUtils doesn't have a method for getting the matching RegEx values out as a collection. That could be added via an extension.