I'm not paying close attention, but is this formatter going to be implemented in a PAYG manner? It seems like things like "eager separators" should be an option/bead. IMO, the most basic thing a DateFormatter needs to do is to format a Date instance. I think it is something else to validate input and auto-complete partial input. There can be different strategies for auto-completing, including "eager separators". These are either some other class or maybe can plug into the base Formatter or the Formatter is part of a chain of things.
The strand is ordered and that may be useful for input auto-complete. Maybe the controller dispatches an event when an input field changes and each option-as-a-bead gets a turn at modifying what gets displayed. HTH, -Alex On 1/22/19, 10:50 PM, "[email protected]" <[email protected]> wrote: This is an automated email from the ASF dual-hosted git repository. harbs pushed a commit to branch develop in repository https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&data=02%7C01%7Caharui%40adobe.com%7C4fac8824414c4eb5e8c408d680ff1445%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838230382531218&sdata=TY0xGWQYHmjVWtYHkBeCsEamc0sahdKPhJUpzCAbO0s%3D&reserved=0 The following commit(s) were added to refs/heads/develop by this push: new 9df5803 Revert eager adding of separators 9df5803 is described below commit 9df58031c97d9b117f4ae0b6f567665e2d0cb91d Author: Harbs <[email protected]> AuthorDate: Wed Jan 23 08:50:25 2019 +0200 Revert eager adding of separators --- .../royale/org/apache/royale/html/accessories/StringDateFormatter.as | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frameworks/projects/Formatters/src/main/royale/org/apache/royale/html/accessories/StringDateFormatter.as b/frameworks/projects/Formatters/src/main/royale/org/apache/royale/html/accessories/StringDateFormatter.as index b6bbacc..72b6fd5 100644 --- a/frameworks/projects/Formatters/src/main/royale/org/apache/royale/html/accessories/StringDateFormatter.as +++ b/frameworks/projects/Formatters/src/main/royale/org/apache/royale/html/accessories/StringDateFormatter.as @@ -96,9 +96,8 @@ package org.apache.royale.html.accessories break; } // if there's no more left, str is empty and no separator - if (i <= length - 2) { - if(token.length == part.length) - result += _separator; + if (str && i <= length - 2) { + result += _separator; } }
