KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Use Find in Design When Changing Method Names
PRODUCT: 4D | VERSION: 15.x | PLATFORM: Mac & Win
Published On: May 15, 2017

When changing a method name, 4D provides the ability to allow it to update all cases in which the method is called in the database. However this does not update cases in which the method is passed as a string into another method such as the CALL WORKER command.
As such immediatly after renaming a method, it is good practice to search for the old name using the "Find in design" feature to see if the method is being passed as string to any other methods.

For example with the following method named Test, the MethodName method is called twice, once directly and passed as a parameter into the CALL WORKER command.


If MethodName is renamed to MethodName2 and the "Update callers in whole database" option is enabled.


The method's name will get updated in everyplace it is called.


However this does not update any place it is called as a string as shown in the updated Test method.


To update the database it can be helpful to use the "Find in design feature" for the old method. Then use the replace feature to update the names, if needed it is also possible to filter and remove items from the results list.