You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/01/23 06:50:34 UTC
[royale-asjs] branch develop updated: Revert eager adding of
separators
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
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 <ha...@in-tools.com>
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;
}
}
Re: [royale-asjs] branch develop updated: Revert eager adding of
separators
Posted by Harbs <ha...@gmail.com>.
It’s a StringDateFormatter which is different than a standard DateFormatter in that it can take a string to format in addition to a Date.
If you only need a Date formatted, this is not the bead you’re going to want to use.
I’m still working on fine-tuning the behavior.
> On Jan 23, 2019, at 9:17 AM, Alex Harui <ah...@adobe.com.INVALID> wrote:
>
> 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, "harbs@apache.org <ma...@apache.org>" <harbs@apache.org <ma...@apache.org>> 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 <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 <harbs@in-tools.com <ma...@in-tools.com>>
> 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;
> }
> }
Re: [royale-asjs] branch develop updated: Revert eager adding of
separators
Posted by Alex Harui <ah...@adobe.com.INVALID>.
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, "harbs@apache.org" <ha...@apache.org> 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 <ha...@in-tools.com>
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;
}
}