Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Justin Mclean
Hi, > So how do you plan to detect which date format to use? In most case to avoid any potential confusion will use month names. > Whatever you do could be encapsulated into a bead and shared with others. Sure that’s my plan. I’ve already checked in a couple that are likely to be useful. Than

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Alex Harui
On 4/18/17, 10:04 PM, "Justin Mclean" wrote: >Hi, > >> Well, who is in the 20% that will see dates in the wrong format? Are >>the >> likely customers of FlexJS this year? > >Yes. It very likely effects current users of a FlexJS application I’m >working on / has been deployed. > >I would need t

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Justin Mclean
Hi, Also SWF is not an option in this environment. Otherwise the project would most likely be using the regular SDK and not FlexJS. But as yo say Intl support may be useful for someone else so could be useful to be implemented, it's just probably not going to be very useful on this project. Th

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Justin Mclean
Hi, > Well, who is in the 20% that will see dates in the wrong format? Are the > likely customers of FlexJS this year? Yes. It very likely effects current users of a FlexJS application I’m working on / has been deployed. I would need to get access to browser stats to be 100% sure. But given so

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Alex Harui
On 4/18/17, 3:50 PM, "Justin Mclean" wrote: >Hi, > >> Because the user has choices (this is not required code that everybody >> must use) 80% is good enough for me. > >Again than mean that 20% of people using the application would see dates >in the wrong format. Depending on the application the

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Alex Harui
On 4/18/17, 3:44 PM, "Justin Mclean" wrote: >Hi, > >> What does your attempt to use the pattern look like? > >if (getBeadByType(IFormatBead) == null) { > var klass:* = ValuesManager.valuesImpl.getValue(this, "iFormatBead"); > var bead:IBead = new klass() as IBead; > if (bead)

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Justin Mclean
Hi, > Because the user has choices (this is not required code that everybody > must use) 80% is good enough for me. Again than mean that 20% of people using the application would see dates in the wrong format. Depending on the application they would get birthdays wrong or show up to meetings o

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Justin Mclean
Hi, > What does your attempt to use the pattern look like? if (getBeadByType(IFormatBead) == null) { var klass:* = ValuesManager.valuesImpl.getValue(this, "iFormatBead"); var bead:IBead = new klass() as IBead; if (bead) { addBead(bead); } } > Did

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Alex Harui
What does your attempt to use the pattern look like? Did you apply the pattern inside addedToParent()? If so, what is the full code of addedToParent()? Did you apply the pattern after super.addedToParent()? -Alex On 4/18/17, 1:41 AM, "jus...@classsoftware.com" wrote: >Hi, > >> It looks to re

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Peter Ent
It is supposed to work like this: A: You may have zero or more beads defined inline in MXML for your component using property. B: You may have zero or more beads defined in CSS for your component. When addElement is called on your component, it will add the underlying element to the display lis

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Alex Harui
On 4/17/17, 11:34 PM, "Justin Mclean" wrote: >>It looks like the Intl class is pretty well supported on JS these days? > >Sadly not, it’s supported but not everywhere [1] - about 80% globally. So >more people can’t use Intl than need the US date format. :-) Because the user has choices (this is

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread justin
Hi, > It looks to related to a bug in getBeadByType. And the reason for that is the addBead call to add DateFormatDDMMBead is called after DateField addedToParent is called Or if you prefer at the time addedToParent is called the beads have not been added so it will add the one defined in

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread justin
Hi, > JFYI - Tried it and it fails to fix the issue. It looks to related to a bug in getBeadByType. It’s checking _beads not beads and at this point beads has a single element in it but _beads is empty so this line: if (!_beads) return null; returns null and it doesn’t run the rest of the met

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-18 Thread Justin Mclean
Hi, > There are variants where you do something like: > > var controller:IBeadController = getBeadByType(IBeadController); > If (controller == null) > { >c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as > Class; >if (c) >{ > controller = new c as IBeadControl

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-17 Thread Justin Mclean
Hi, Missing [1] reference in my last email was http://caniuse.com/#search=Intl Justin

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-17 Thread Justin Mclean
HI, > The recommended pattern is in UIBase and hopefully elsewhere. I’ll give that a try. > Do we need resources in order to make a locale-dependant DateFormat bead? Probably not but I’ve no idea can you can conditionally include classes in CSS based on locale or pass property of a bead based

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-17 Thread Alex Harui
On 4/17/17, 9:48 PM, "Justin Mclean" wrote: >Hi, > >> That would imply a bug elsewhere DateField. > >DateField consist of 3 functions addedToParent and a selectedDate >setter/getter. How would you fix this bug? > >> The pattern all components >> should be using is to define an interface for a

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-17 Thread Justin Mclean
Hi, > That would imply a bug elsewhere DateField. DateField consist of 3 functions addedToParent and a selectedDate setter/getter. How would you fix this bug? > The pattern all components > should be using is to define an interface for a class of beads, maybe > something like IDateFormatBead.

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-17 Thread Alex Harui
On 4/17/17, 8:31 PM, "Justin Mclean" wrote: >HI, > >> What is the scenario where everybody will need this code? > >If they want to use a date formatter and not have dates displayed as >“-MM-DD”. > >Before these changes dates would be formatted as US style dates by >default and if you added

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-17 Thread Justin Mclean
HI, > What is the scenario where everybody will need this code? If they want to use a date formatter and not have dates displayed as “-MM-DD”. Before these changes dates would be formatted as US style dates by default and if you added a different date format bead it would still incorrectly

Re: [4/6] git commit: [flex-asjs] [refs/heads/develop] - replace existing format bead if it exists

2017-04-16 Thread Alex Harui
Hi Justin, What is the scenario where everybody will need this code? -Alex On 4/16/17, 9:24 PM, "jmcl...@apache.org" wrote: >replace existing format bead if it exists > > >Project: >https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us >.apache.org%2Frepos%2Fasf%2Fflex-as