HowTo find stuff

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

HowTo find stuff

Postby tkilshaw » Wed Jun 21, 2006 7:13 pm

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?

thanks,

Terry

Terry
tkilshaw
 
Posts: 34
Joined: Thu Nov 24, 2005 10:28 pm
Location: Kelowna, BC, Canada

Postby swingman » Wed Jun 21, 2006 8:09 pm

Hi Terry,

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 ;-)
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Postby tkilshaw » Wed Jun 21, 2006 8:53 pm

Christian,

I'm OK with simple to medium-hard SQL.

Can you give an example. Sounds like this might be the only way to accomplish this.

thanks,

Terry
tkilshaw
 
Posts: 34
Joined: Thu Nov 24, 2005 10:28 pm
Location: Kelowna, BC, Canada

Re: HowTo find stuff

Postby Jan Aleman » Wed Jun 21, 2006 9:30 pm

tkilshaw wrote: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.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby tkilshaw » Wed Jun 21, 2006 10:39 pm

Jan,

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.

thanks,

Terry
tkilshaw
 
Posts: 34
Joined: Thu Nov 24, 2005 10:28 pm
Location: Kelowna, BC, Canada

Postby Jan Aleman » Wed Jun 21, 2006 11:06 pm

Terry,

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.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby swingman » Wed Jun 21, 2006 11:10 pm

tkilshaw wrote:Christian,

I'm OK with simple to medium-hard SQL.

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... :-(
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Postby tkilshaw » Thu Jun 22, 2006 12:44 am

Jan,

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.

thanks for your consideration,

Terry
tkilshaw
 
Posts: 34
Joined: Thu Nov 24, 2005 10:28 pm
Location: Kelowna, BC, Canada

Postby Harjo » Thu Jun 22, 2006 8:38 am

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..)

It would indeed be a huge timesaver.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby Jan Aleman » Thu Jun 22, 2006 8:55 am

Terry,

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.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Harjo » Thu Jun 22, 2006 8:58 am

once we have figured out the best way to do this you'll see it appear as a feature in Servoy.

Cool! 8) I had the assumption it was'nt possible at all.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby tkilshaw » Thu Jun 22, 2006 6:37 pm

Jan,

sounds good. Any sense of when this might be available? Weeks, months, years?

thanks,

Terry
tkilshaw
 
Posts: 34
Joined: Thu Nov 24, 2005 10:28 pm
Location: Kelowna, BC, Canada


Return to How To

Who is online

Users browsing this forum: No registered users and 4 guests