Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Expandable Sections
Expandable Sections [message #519102] Sat, 06 March 2010 09:44 Go to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 126
Registered: March 2010
Senior Member
Hi all

Those of you who read the scout blog have probably saw that it is now possible to define a section as expandable. I like this new feature a lot but there is something I would like to discuss: The default of the property 'expandable' is set to true, so if you ugrade scout in your swt project suddenly all sections are expandable.

Maybe you don't care about that. Maybe you say: Great thats exactly what I need and I don't even have to do something! Or maybe you know that your customer doesn't want that at all or at only one form and you have to modify every groupbox in your project so that it looks and feels like before.

I don't say the property has the wrong default value. I just want to ask how do you think about it.
In my opinion it is good if the default properties fit the needs of the most of us. But I think it should be possible that a project can easily modify this behaviour if they don't like it. Particularly if the default used to be another one.

What do you think about it? Is it necessary that scout provides a possibility to change default properties? Or should the project itself care about it? One way to change this behaviour in your project would be to extend the default Gui-Groupbox and bypass the existing logic. This works fine if you don't want expandable sections at all. If you need at least one expandable section you have to extend the model-groupbox too and create a custom property because the gui does not know if the model-component uses the default or overrides the default.

Do you know another way to change such default behaviours?

I apologise for the long text but in my opinion this is an important topic since I've had several discussions about default behaviours in the last months and I would like to avoid them in the future:-)

Regards
Claudio
Re: Expandable Sections [message #519846 is a reply to message #519102] Wed, 10 March 2010 03:34 Go to previous messageGo to next message
Anna-Nina Simonetto is currently offline Anna-Nina Simonetto
Messages: 2
Registered: March 2010
Junior Member
In my opinion new features shouldn't change the behaviour of existing applications. Additionally I don't like to have new features imposed on my project, even if they are very cool and fancy!

Especially during a freeze there shouldn't be any new feautres added to a product because everybody is relying on a consistent and well-working software. With new features there is always the risk of new errors.

I suggest the following behaviour:
- Before a new feature is added to the product, everybody is informed about the changes and the impact of these changes
- A new feature is added to the product at the earliest with a new release
- A new feature shouldn't ever change the behaviour / layout of already existing products exept there is an easy (e.g. global) way to deactivate it once for all for already existing products (for any reason whatsoever a project wants to deactivate it).

I am really happy to discuss this subject because I think it is important that we have a good quality assurance Smile

Regards,
Anna-Nina

[Updated on: Wed, 10 March 2010 09:05]

Report message to a moderator

Re: Expandable Sections [message #519857 is a reply to message #519846] Wed, 10 March 2010 04:21 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan Motsch
Messages: 100
Registered: March 2010
Senior Member
I agree with Anna-Nina.
Thats the way it should and will be.

Fact however is that the section bug was escalated to highest priority to be also done in the branch (as a one-time exceptionto the rule).
icon2.gif  Re: Expandable Sections [message #519869 is a reply to message #519857] Wed, 10 March 2010 04:59 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan Motsch
Messages: 100
Registered: March 2010
Senior Member
The solution could look like this:

The new property "expandable" is default false.
The default decoration style is line, as before.
This ensures the natural "no-change" for existing code.

A project wishing to have the general default decoration style "section" and expandable true can simply make use of the template pattern:

instead of using
class MyDetailBox extends AbstractGroupBox{
...
}

you create in your project a template class:

class MyAbstractGroupBox extends AbstractGroupBox{
@Override
getConfiguredBorderDecoration(){
return BORDER_DECORATION_SECTION;
}

@Override
getConfiguredExpandable(){
return true;
}
...
}

and then your field as:

class MyDetailBox extends MyAbstractGroupBox{
...
}


Alternatively MyAbstractGroupBox could also be named for example MyAbstractSection etc.
Re: Expandable Sections [message #520035 is a reply to message #519102] Wed, 10 March 2010 16:54 Go to previous message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 126
Registered: March 2010
Senior Member
Hi all

Thanks for your replies!

I think the template pattern is a good way to handle such things. With the help of search / replace it shouldn't even be a big deal to update the existing code, if necessary Smile

Regards
Claudio

Previous Topic:Where are the demos?
Next Topic:Expandable Sections
Goto Forum:
  


Current Time: Fri Jul 25 09:53:32 EDT 2014

Powered by FUDForum. Page generated in 0.01634 seconds