Various places in the Servoy docs says things like “check your whole solution” if you change the name of something.
The Editor has a Find command, but that only works for scripts.
How do I find a value in a property? If I change the name of, for example, a style. That style name is not changed automatically everywhere it is used. I need to find all of the places it is used and change them myself.
How is this done in Servoy? Surely the answer cannot be, open every form and form element everwhere and look for it?
With some SQL experience you can search the servoy repository directly to find stuff. The entire project is stored inside a database as text – unlike FileMaker’s proprietory format.
However, I would not recommend leaving this for a while if you are new to Seroy or to SQL queries
tkilshaw:
How do I find a value in a property? If I change the name of, for example, a style. That style name is not changed automatically everywhere it is used. I need to find all of the places it is used and change them myself.
I’d recommend not renaming style sheets. Servoy, just like all other text-based programming environments, requires you to think then code. Once you decide on a name for a style you stick to it. Once you get used to it you’ll notice it’s not hard to live with.
the Servoy documentation repeatedly tells you to check your whole solution if you change the name of something.
Sensible programming requires that the names of things evolve as the application evolves. The notion that you will get the names right first time is naiive and contrary to how people actually work. That’s one big reason why FileMaker still has so many people using it. It handles renamiong of just about anything very gracefully.
I guess that your response really means that Servoy does not offer any way to check the whole solution?
I consider this to be a major omission and would like to think that Servoy takes this seriously and intends to remedy this defect soonish.
I’m not exactly sure what point you are trying to make, perhaps you can elaborate more in detail. Our documentation, as you state, clearly warns for renaming of objects and as I stated this counts for all programming environments that are text based. Filemaker is one of the only exceptions and has static script lines and variables that map to unique identifiers as they run their proprietary language and engine, this is a great benefit of a proprietary engines and languages. Once you choose for standardised and open languages this is no longer an option: the good news is you will receive much more benefits back for this small sacrifice.
Speaking of Filemaker: how would you rename a CSS in Filemaker? I havn’t been using it for a while but I’d be interested to know how Filemaker would handle CSS and renaming issues, maybe we can learn something.
Can you give an example. Sounds like this might be the only way to accomplish this.
thanks,
Terry
OK, examine the servoy repository database with a thirdparty SQL tool such as Aqua Data Studio and numerous others and you will see about 20 tables.
I can’t give you an exact query, I wrote one last week to examine properties of form elements. Unfortunately my cleaner blew the main fuse before I managed to save it…
I’m a new Servoy user with a recent background in Filemaker programming and lots of C, C++, Java, etc experience. So I’m noticing things in Servoy that long time users have gotten used to. My kind of feedback could be of use to you.
Servoy documentation does warn about changing names. And wherever it does it also usually suggests that you examine your whole solution. It does not tell you how to do that. Hence the starting point of this thread. I had a hard time believing that this can’t be done in Servoy.
In all text-based IDE’s that I have used it is easy to search and replace across multiple source files. I don’t consider Servoy to be a text-based development environment, though you seem to be saying that it is. I guess that it could be a lot more challenging to accomplish this in Servoy.
I’m not suggesting that Servoy should automatically rename things in the way that Filemaker does. I am suggesting that Servoy needs to provide a way to find all places where a given string is used. To allow replacement at the user’s discretion would be a big plus.
From my perspective the value of appropriate names and a way of discovering at least where they are used is important. Have you never had to try to make sense of some code that was not only poorly documented but where the names of things was not appropriate?
This search mechanism could be a simple as string output with each line formatted:
formName/name|text|dataProvider/propertyName
Or it could be a list similar to the above with each line a link to open the appropriate form and highlight the target element and/or property.
I’m sure that your engineers could come up with something better than what I’m suggesting and it might be worth your while asking the Servoy user-base for their opinion. I still consider this to be a very important bit of functionality.
I’m not suggesting that Servoy should automatically rename things in the way that Filemaker does. I am suggesting that Servoy needs to provide a way to find all places where a given string is used. To allow replacement at the user’s discretion would be a big plus.
I think Terry has a point here!
Renaming of columns, etc…is sometimes necessary. (we came across it, translating a solution from dutch to english, we came across it, matching a Servoy solution with a web-shop, etc…)
To start with your first comment: your feedback is highly appreciated. As you can see in this forum many of Servoy’s employees actively participate in discussions to see what we have to incorporate next in our product. Nearly all features in our product were inspired by what our customers told us they needed, our job is to not only build and deliver this features but also to try to figure out what we have to build first. Unlike companies like for example Google we don’t have unlimited developers to develop any feature so we have to carefully balance between what can be done and what would be really cool to have in the product. Searching, renaming and analysis of properties has always been on our radar and we are continously working on enabling even more intuitive ways of using this in Servoy. Not too long ago we added find and replace to the Method editor and for quite some time we have been investigating how we could implement this in other places of Servoy as well, once we have figured out the best way to do this you’ll see it appear as a feature in Servoy. Obviously doing a ‘blind’ search replace is not the solution, chances are very big that other objects might contain the same wording as your column names so it will be more sophisticated than that.