adding names by default

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

adding names by default

Postby Boudewijn » Sun Feb 13, 2011 11:41 am

When I add objects to the form they receive NO name.
That has to be added manually.
Quite a burden if you want to access them in code.

eg.
when adding textboxes that are not bound to fields in a table the automagically assigned names could be text1, text2 etc
If the developer wishes to reference them he has at least something available.
Boudewijn
 
Posts: 41
Joined: Sun Sep 26, 2010 8:35 am

Re: adding names by default

Postby jgarfield » Mon Feb 14, 2011 10:00 pm

By that same token if I have a lot of elements on my form that I don't want to access in code, then not automatically filling in incremental default names keeps my auto-complete code and element namespace nice and neat, only filled with values which I have decided are important.

It also has the added benefit of making a developer think about what to name things so that they have names that make sense and hopefully make it easier to know what is going on in the code. What future developer is going to know what elements.text1 is? elements.searchBox however, is at least indicative of about what this thing is.
Programmer.
adBlocks
http://www.adblocks.com
jgarfield
 
Posts: 223
Joined: Wed Sep 28, 2005 9:02 pm
Location: Boston, US

Re: adding names by default

Postby Boudewijn » Mon Feb 28, 2011 9:50 am

what I mean is that if I add a field from a table to a form (as an example) and this field is a textfield the automatic assigned name could be like txtFieldName.
At the same time a label will be displayed (telling what the textbox is about) and that label could be lblFieldName.
FieldName is of course the name of the field from the table.

If that field contains dates the name could be like datFieldName
Containing a memo field the automatic name could be memFieldName
I guess you see where I am thinking of.

Other, not directly related controls on a form should have an incremented name (command1, command2 etc.)
Those names can then be changed by the developer (cmdOK, cmdCancel, ...)
Boudewijn
 
Posts: 41
Joined: Sun Sep 26, 2010 8:35 am


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 14 guests

cron