Undocumented feature breaks existing style usage, PLS VOTE

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Undocumented feature breaks existing style usage, PLS VOTE

Postby ROCLASI » Mon Mar 25, 2013 10:29 pm

Here is a heads-up for you developers using/going to Servoy 6.1.

It seems that Servoy 6.1 introduced a nice new feature where a form style-name can be automatically applied to all it's form elements.
It's also undocumented, at least I can't find it anywhere in the release notes of 6.1.
If you have a form style named form.fancyStyle and field/label/etc. styles with the same name then all these styles are applied even without assigning this style to you form element. It can be a nice timesaver.

BUT.

If you are migrating pre-6.1 solutions to 6.1 then you might end up with some surprises. I for one use the style name 'border' a lot for adding borders to my many different form elements.

Lets say you have the following stylesheet:
Code: Select all
form.border {
   border-color: #CCCCCC #CCCCCC #CCCCCC #CCCCCC;   
   border-style: solid;
   border-width: 1px 1px 1px 1px;
}


label.border {
   border-color: #CCCCCC #CCCCCC #CCCCCC #CCCCCC;
   border-style: solid;
   border-width: 1px 1px 1px 1px;
}

field.border {
   border-color: #CCCCCC #CCCCCC #CCCCCC #CCCCCC;
   border-style: solid;
   border-width: 1px 1px 1px 1px;
}

tabpanel.border {
   border-color: #CCCCCC #CCCCCC #CCCCCC #CCCCCC;
   border-style: solid;
   border-width: 1px 1px 1px 1px;
}

Now in Servoy 6.1 just by assigning the style 'border' to your form ALL your form elements on that form will show their 'border' style. I haven't found a way to override this other then renaming your style classes. Of course in large solutions this can be a Royal-pain-in-you-know-where.

I already filed an issue with Servoy for this but they say that it's a feature and that changing this behavior might break existing solutions. (Of course this new behavior already broke existing behavior to begin with...)

So my question to you all is who is using this new style behavior and who thinks this should be reverted to the old behavior.
I think it's still a nice feature so perhaps Servoy should add a form property (checkbox) to enable this behavior as an option (i.e. Opt-In) instead of making it the default.

Please vote or add a comment to the ticket (or in this thread)
https://support.servoy.com/browse/SVY-4164


Thanks for any input!
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Undocumented feature breaks existing style usage, PLS VO

Postby david » Tue Mar 26, 2013 1:01 am

From Troy: rename your form.border class to something unique and the find/replace in your *frm files on regexp:

Code: Select all
(?s)(items:\[.*\](?:.*?)styleClass:")(?:border)(")


replace with:

Code: Select all
$1uniqueStyleName$2
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Undocumented feature breaks existing style usage, PLS VO

Postby ROCLASI » Tue Mar 26, 2013 3:13 pm

Just received word that this issue is now solved (6.1 and 7.0).
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 10 guests