[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-24 Thread ben.clinkinbeard
OK, I've made a modified version more suitable for MXML and would love to get feedback from everyone. Ideally I would be able to bind a field or label directly to the formatted output and would not require a click to 'reset' the field that is bound to the formatted value. How would I accomplish

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-24 Thread ben.clinkinbeard
OK, I've got it working how I wanted. Would love to hear feedback on my structure as well as whether or not you find this useful. Usage: local:QuickDateFormatter id=qdf date={fieldOne.text} dateFormat={fieldTwo.text} / mx:Label text={qdf.output}/ Source class: package { import

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-24 Thread gotgoose09
First of all, I would read Creating and Extending Flex 2 Components Creating Nonvisual Flex Components Creating Custom Formatters Creating a custom formatter in the documentation. The documentation for DateFormatter says that it has a formatString variable, so you can get rid of str_dateFormat

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-24 Thread ben.clinkinbeard
Thanks gotgoose, I actually realized a lot of that a while after my post and hadn't gotten a chance to update this thread. Thanks for pointing me to that section in the help though, there is some good info there. Upon further review, you can basically do what I was attempting with the built-in

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-23 Thread gotgoose09
All you have to do is add public properties like this: [Bindable] public var str_dateFormat:String; [Bindable] public var str_dateString:String; --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Yea, what I am looking for is some help on what changes would need to be

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-21 Thread ben.clinkinbeard
Sorry, it attached my comma to the link. Should be http://www.returnundefined.com/2006/07/quickdateformatter-efficient-date-formatting-in-as3/ Thanks, Ben Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-21 Thread gotgoose09
All you have to do is:In your application mxml file, add this attribute to the Application tag: xmlns:mycode="com.fmr.utils"Then you can add your formatter with this code:mycode:QuickDateFormatter /You use it by adding id="myQuickDateFormatter" to the tag. An alternative is to put this code in

[flexcoders] Re: QuickDateFormatter - how can I make it MXML enabled?

2006-07-21 Thread ben.clinkinbeard
Yea, what I am looking for is some help on what changes would need to be made to the class to allow it to be used in a format similar to this: utils:QuickDateFormatter id=qdf str_dateString={model.someDate} str_dateFormat=MM/DD/YY / mx:Label text={qdf} / Thanks, Ben