Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Changed MessageElement to allow injection of the cell rendering code via a constructor FactoryMethod. #125

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

This means that people can reuse MessageElement and easily change the way it displays without starting from scratch (copying the code). Maybe this pattern could be useful for other elements too. This is not a breaking change - it maintains compatibility with existing code as the MessageElement siimply defaults to the existing MessageSummaryView. I'm happy to provide documentation and/or example code if this pull request is accepted.

Owner

migueldeicaza commented May 3, 2012

Elements are in general very small bits of code, so I wonder if this is really needed. I need to sleep on this.

The other problem is that this patch contains style changes, and those in general should not be done when submitting patches.

Sorry about the style changes (I assume you are referring to the brace position). Maybe you are right about making elements flexible... I ended up having to inherit MessageElement to add extra data members (indentlevel and userimage) anyway. I guess as long as the source is available it can be copied and modified to suit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment