Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BED6ADF0F for ; Thu, 3 Jan 2013 12:25:26 +0000 (UTC) Received: (qmail 38366 invoked by uid 500); 3 Jan 2013 12:25:26 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 37985 invoked by uid 500); 3 Jan 2013 12:25:25 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 37961 invoked by uid 99); 3 Jan 2013 12:25:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2013 12:25:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carlos.rovira@gmail.com designates 209.85.215.53 as permitted sender) Received: from [209.85.215.53] (HELO mail-la0-f53.google.com) (209.85.215.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2013 12:25:19 +0000 Received: by mail-la0-f53.google.com with SMTP id fn20so7681050lab.40 for ; Thu, 03 Jan 2013 04:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=ux0M27TG3NZxKn5YRj5zHJp/6y66xv7xYdi+725X2p0=; b=J34sfD8u32BbGsv4YULosJxRklmtbU7su2J6A1+Tv1pxOWYW8lzlrPTKFj828NpAoL 382/VHV4YcNYCEzkxqzJRAVrQM37KEsVWfGdBeYDqnjI03R117cTZCFRR1H6KZY4WhXz x35Dz7eW+TZLHo3/x2jVJlAYNdHbQqfz8Ojqf+6HPWtbtnYQwl5NAuBc+VPmzxRPN/5B hOsH0h0sNPrB8fbMCHj43l64LIAG/bum4pmJWcqkwg4cGRSIqx0TRCPo+Bc99jw+jAtp w1PdS3oLzniM0B5YNu4KCH4vi8KFWsKkSBozhR+riNEh6BxIimGXr0SS7iDeDsd2vnGT 1lNw== MIME-Version: 1.0 Received: by 10.152.124.15 with SMTP id me15mr47075908lab.5.1357215898888; Thu, 03 Jan 2013 04:24:58 -0800 (PST) Sender: carlos.rovira@gmail.com Received: by 10.112.142.202 with HTTP; Thu, 3 Jan 2013 04:24:58 -0800 (PST) In-Reply-To: <66E38C42347D6446BF7FCB22C3D3878072E3524299@ECCR06PUBLIC.exchange.local> References: <66E38C42347D6446BF7FCB22C3D3878072E3524299@ECCR06PUBLIC.exchange.local> Date: Thu, 3 Jan 2013 13:24:58 +0100 X-Google-Sender-Auth: owDGk5OdYihS_uQvsb5npMQGUvo Message-ID: Subject: Re: NumericInput component? From: Carlos Rovira To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d043745818968d304d2617329 X-Virus-Checked: Checked by ClamAV on apache.org --f46d043745818968d304d2617329 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Chris, I solved the problems in the NumericStepper with the following extension (only share related code since my class has more "own-framework" stuff): public function NumericStepper() { super(); valueFormatFunction =3D discountFormat; valueParseFunction =3D discountValueParse; } /** * fix varius problems in spark NumericStepper * -stepSize * -NaN values */ public var formatter:NumberFormatter =3D new NumberFormatter(); private function discountValueParse(value:String):Number { var final:Number =3D formatter.parseNumber(value.replace(",",".")); if(isNaN(final)) { return 0; } return final; } private function discountFormat(value:Number):String { return value.toString(); } Maybe this will solve the NS problems and will not need a new component? (this code could be refactored to the core parts of the component instead of this kind of solving). Let me know your opinion. Thanks Carlos 2013/1/3 christofer.dutz@c-ware.de > Hi, > > Just wanted to ask, how about adding a new type of input field to Flex. > Because in almost all of my projects I the requirement to input numeric > values. For this I created a special type of Input component based upon t= he > ordinary spark input. Currently I'm dragging this component into every > project I am working on and I guess a lot of you will be doing the same > with their NumericInputs (The Numeric spinner does have its problems with > handling fractional stuff) ... thought others could be interested in it. = It > does have the one or the other minor glitch. Perhaps together we could so= rt > them out and have a nice and clean NumericInput field. > > What do you think? > > Chris > > --=20 Carlos Rovira Director de Tecnolog=EDa M: +34 607 22 60 05 F: +34 912 94 80 80 http://www.codeoscopic.com http://www.directwriter.es http://www.avant2.es --f46d043745818968d304d2617329--