Just playing around with the new functions and noticed the following:
-
When creating a new Style in the Servoy Editor, the new Style does not appear in the lower left area of the Editor (where you normally see the available methods), until you restart Servoy
-
The i18n-node in the Editor doesn’t have a valid Icon attached to it. I see a white box with a red “x” in it as Icon
-
Would be handy to have to option to create a new style by pressing a button in the lower right portion of the Editor, just as you do for Methods
-
If you have the name of an object defined as an i18n, then, after changing the Locale in the Developer, you go into the NameEditor for this field and it still says you’re editing the name for the Old Locale, while in fact you are editing the name for the new Locale
-
It would be handy if you could edit the name for a specific locale without having to switch the Developer to that Locale and then restart developer.
-
Also handy, I think, would be the option for the developer to limit the number of Locale’s there are. Now the entire list of countries in the world seems to be in there. I would like to limit it, to, for example just English and Dutch. In the Client only those two would then be available for the user to select. And then (see previous point) I would like to be able to edit the values for both selected languages for a specific objects name property in the same screen, without having to change the locale and restart the Developer.
So far my findings…
Paul
PS: What does the StyleClass property of elements do?
I have also played around with the new functions. Here are some of my impressions and remarks to Paul’s:
It would be handy if you could edit the name for a specific locale without having to switch the Developer to that Locale and then restart developer.
As far as that is concerned, I think it is easiest you make a form or solution based on the messages table. There you can edit whatever you like… The only downside to this is that you cannot see several languages next to each other but have to edit language by language.
-
as far as styles are concerned, I am sure that we need more possibilites (more styles), like “form”, “body”, “header” etc. In my eyes, extensive use of styles is only useful if you can access as much as possbile in a style. Otherwise you end up doing a few things in a style and others directly on the object.
-
I noticed that i18n (by the way: why this name?) is not supported in table view (field names)
-
Style “conversion” is not so perfect: for example, all my fields are text-align “left”; in 2.1 now there is a text-align “default”, which refers to the default of the style. But all my fields are set to centered now instead of default or left. The same goes for form background color. I had set a color that is now lost. I cannot apply a style to the form or its body, so I have to manually change all background colors again.
So far my findings… More to come for sure. ![Wink :wink:]()
As many would tell you i18n stands for internationalization and comes from the fact that internationalization is composed of 18 letters between the first and the last letter.
i +“18 letters”+ n
Thanks for that cultural background information ![Smile :)]()
patrick:
As far as that is concerned, I think it is easiest you make a form or solution based on the messages table. There you can edit whatever you like… The only downside to this is that you cannot see several languages next to each other but have to edit language by language.
The way I do it - is to make a form that looks at the “message” table - and then I sort by key (the object name) and the locale. This will show me all the strings in order and show me each local’s string.
patrick:
as far as styles are concerned, I am sure that we need more possibilites (more styles), like “form”, “body”, “header” etc. In my eyes, extensive use of styles is only useful if you can access as much as possbile in a style. Otherwise you end up doing a few things in a style and others directly on the object.
We’re working on a list of all the supported objects and types.
patrick:
I noticed that i18n (by the way: why this name?) is not supported in table view (field names)
It is supported - the column name comes from the “text” property of a field - and the text property does support i18n.
patrick:
Style “conversion” is not so perfect: for example, all my fields are text-align “left”; in 2.1 now there is a text-align “default”, which refers to the default of the style. But all my fields are set to centered now instead of default or left. The same goes for form background color. I had set a color that is now lost. I cannot apply a style to the form or its body, so I have to manually change all background colors again.
“default” means the LAF default. You can set a new style called “form_bgcolor” and set the color to the color you want. Then you can use the StyleClass property to choose that style on your background objects.
GREAT feedback, though! Thank you - please keep it up. ![Very Happy :D]()
Cheers,
Bob Cusick
Bob,
I have the same problem. I read your reply but I still don’t get it. The fields on my 200 form solution used to be aligned left and now they are centered. The background used to grey and now it is white. How do I fix it. Please be specific as possible. Please don’t tell me I need to go back and edit all 200 forms.
John McCann
We will provide a fix in Servoy 2.1 beta3 for the alignment, the default is indeed “center” instead of “default”
patrick:
as far as styles are concerned, I am sure that we need more possibilites (more styles), like “form”, “body”, “header” etc.
Form will be availeble in Servoy 2.1 beta3
Just tried the form style and it looks good. It doesn’t, however, apply to headers etc., but only to the body, right?
REMINDER SERVOY Invoice.zip (134 KB)
one more question: I just played with the styleclass property. As far as I guessed its meaning, I thought that in my style I define a class with a name of my choosing for example for a label. Then I type the name of that class into the styleclass property and the style is applied.
When I did so, I saw the style applied once shortly, but then it was overriden by the default style as if Servoy did not find my styleclass definition. I never managed to see the style apply again…
Could someone explain shortly how the styleclass property is supposed to be used?
Thanks.
REMINDER SERVOY Invoice.zip (134 KB)
It does indeed only apply to the body, should it apply to all parts?
about the css classes, if you create a class in the css like:
label.mytext
{
....
}
and fill the property style_class on a label form element with ‘mytext’ you will see that ‘label.mytext’ is used instead of default ‘label’ class
Hello Jan,
thanks for the advice with label.mytext. I tried it that way, but tried with the full “label.mytext” and figured the dot was not accepted. So I will try with “mytext” only.
Regarding the body: I don’t think it should apply to all parts. But then there should be a form.header etc. style, so we can configure that. If not, you have to go through all forms to change the header. I use that very often in table views that show up in tab panels for buttons like “new”…
But let’s take the discussion further: Couldn’t a style be configured like this:
Servoy supports certain properties like background color etc. for certain element types (e.g. a label can be “styled” with font, background color, …).
All element types that support styles have a styleclass property (a form, a body, a header, a label, a text field etc.).
The style that we can define today applies to every element type that doesn’t have a specific styleclass attached to it.
Then we can define specific styles just we can do know with labels. Something like formbody.mytext would then be possible and attachable via the styleclass property of the body of a form.
I think this would be the most consistent way of using styles and gives us a tremendous amount of customization possibilities.
How about that ? ![Wink :wink:]()
patrick:
Regarding the body: I don’t think it should apply to all parts. But then there should be a form.header etc. style, so we can configure that.
we will add this in Servoy 2.5
patrick:
All element types that support styles have a styleclass property (a form, a body, a header, a label, a text field etc.).
We will add ‘style_class’ to form and parts this in Servoy 2.5
a new style is now (2.1b4) being added to the list when you save it.
(You could already do SHIFT-F5 == refresh)
A new style button is currently not very easy to do in that context, But i added the 2 create functions also in the popup of the lower left area. So you don’t have to select the node in the tree anymore to be able to create a new style.
pbakker:
- The i18n-node in the Editor doesn’t have a valid Icon
attached to it. I see a white box with a red “x” in it as Icon
Paul,
Actually, the “white box with a red x” is not a bug - it is merely a
placeholder for the icon. Though i18n is an established standard and
widely supported, apparently it has no universal icon. Once we have
completed the design for the i18n icon, it will be added to the i18n node in
the Editor.
Marc Norman
Servoy
I18N support is improved now in 2.1b4
1> you can change the language in the i18n text editor. So you can edit/view multiply languages at onces for one key.
2> you only see the languages so the list is not that long.
3> You also have that i18n part of the text editor in its own window now. Can be opened by pressing the toolbar button just before methods..