Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue-584: Fixed sub sequence when the resulting sub sequence will be… #585

Closed
wants to merge 1 commit into from

Conversation

afester
Copy link
Collaborator

@afester afester commented Sep 17, 2017

… empty

@JFormDesigner
Copy link
Contributor

I think this needs more investigation because this PR would undo PR #578 which fixes #573

@afester
Copy link
Collaborator Author

afester commented Sep 18, 2017

Thanks for the link to #573 - will check that ...

@JordanMartinez
Copy link
Contributor

The issue that arises both in #573 and #584 is the fact that a style is still associated with an empty segment. Thus, one cannot use a singleton empty segment throughout the area when referring to an empty one because of the style. If you do, it messes up the undo/redo system (e.g. Unexpected change received: Expected StyledText[text="" style=null] Actual StyledText[text="" style=]. See also my comments from the Hyperlink demo PR here and here

Again, this is why I'm proposing #567 as then we could have algerbraic data types: an empty and non-empty segment that can be created, subsequenced, etc. without needing the know anything about its style.
The real issue is that Paragraph doesn't have a way to know what style it should use when creating an empty segment. If it's the first paragraph in the area, it should default to initialTextStyle. If it's in the middle, it should default to the style stored at the last part in the preceding paragraph.

@afester
Copy link
Collaborator Author

afester commented Sep 23, 2017

This requires some more investigation and also integration tests should be provided for #573 and #584 .

@afester afester closed this Sep 23, 2017
@JordanMartinez
Copy link
Contributor

@afester Can you write a test that shows the error arising? If you're not familiar with TestFX, you can write a sample JavaFX App and then list comments as to what is supposed to happen once the stage is shown. Then, I can convert it into a TestFX test.

@afester afester deleted the Issue584 branch September 28, 2017 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants