[ https://issues.apache.org/jira/browse/PIVOT-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16322784#comment-16322784 ]
Roger Whitcomb commented on PIVOT-1022: --------------------------------------- Same changes to TextInput and TextArea too: Sending wtk\src\org\apache\pivot\wtk\TextArea.java Sending wtk\src\org\apache\pivot\wtk\TextInput.java Transmitting file data ..done Committing transaction... Committed revision 1820922. > Add maximum limit to our stack implementations > ---------------------------------------------- > > Key: PIVOT-1022 > URL: https://issues.apache.org/jira/browse/PIVOT-1022 > Project: Pivot > Issue Type: Improvement > Components: core-collections > Reporter: Roger Whitcomb > Assignee: Roger Whitcomb > Priority: Minor > Fix For: 2.1 > > > In an obvious use case for a stack: namely the TextPane "undo" stack, the > "Stack" class was not used because there is an enforced limit, which was not > a feature of our stack class. So, adding an optional limit would allow this > use case without duplicating code. > The limit would check after a "push" operation to see if the total stack > depth then exceeds the limit, which would then remove the oldest element in > that case. (This is the way the code in TextPane works.) -- This message was sent by Atlassian JIRA (v6.4.14#64029)