Hi everyone, I hope you are all good. Today I come with a little extension but very useful for you. This extension allows you to call methods and set the properties with try and catch. WHat is Try & Catch? Try and catch place around the code to catch the exception like if you have a list of 3 items and you are selecting 4th then it will throw a runtime error with a dialog that impact very bad on UI and to user. So that's why I come up with this little extension. It has few blocks that will help you to catch the exception while calling the method and setting the properties of the components. As it works througn Java reflection so you can also call method of extensions even this extension.
So let see its blocks and their documentation.
This event raises when any exception is caught. It gives the exception in string. For ex, java.lang.ArrayIndexOutOfBoundsException
.
This block is for selecting the item of a list with catch exceptions. If the index is greater than the list length then it will simply call the catch
event with java.lang.ArrayIndexOutOfBoundsException
exception.
This block invokes the methods and properties of the component as well as extensions. You just need to pass the component or extension to component
parmaeter and method or property name to the name
parameter and then just provide a list of parameters of that method that you are calling and the method will be invoke or called. If the called method is void type then you will get nothing in return but if not then it will return the result of the invoked or called method. If any error occured then catch
event will be raised.
I hope you understood the documentaion. So let's usage of it.
There is very simple blocks and usage.
Selecting a item from a list for given index.
Calling a return a method of a label. The same way you can call the void methods of the extension and designer property of the components. Just remember to pass the parameter for the method that you're calling.
Calling a return method of the extension.
You can download the extension from out folder or click here
Contact Sumit for asking about this extension