Adobe Dreamweaver Forums



Last 10 THreads :         Re: SFW and date created (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          help me with adjustments layers in CS4 (Last Post : eddie caruso - Replies : 3 - Views : 4 )           »          "Save As" crashes PS (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 3 - Views : 4 )           »          CreateODBCDate and cfqueryparam with cf_sql_date (Last Post : -==cfSearching==- - Replies : 1 - Views : 2 )           »          Change custom Vector class to new Vector class in player10 (Last Post : flexstone - Replies : 2 - Views : 3 )           »          Changing background of image (Last Post : Linda Rathgeber - Replies : 4 - Views : 5 )           »          Spellcheck and CFExecute (Last Post : Fetch - Replies : 1 - Views : 2 )           »          old syntax? (Last Post : David Mainstreet - Replies : 2 - Views : 3 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 12:23 PM
nikos101
 
Posts: n/a
Diggs:
Default The event itemFocusOut gets called twice when the regexpasses.

I some code like this in a datagrid:

The event itemFocusOut gets called twice when the regex passes.

Does anyone know why?



<mx:itemFocusOut>
<![CDATA[


if((event.itemRenderer as TextInput).text.search(new RegExp(/.*\..*\./))
!= -1){
Alert.show("You may not enter a value with more than 1 decimal
point.\n\nAction Aborted.");
return;
}

]]>
</mx:itemFocusOut>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 12:33 PM
nikos101
 
Posts: n/a
Diggs:
Default Re: The event itemFocusOut gets called twice when theregex passes.

I'm also getting erros I don't know how to debug:

at
mx.controls::AdvancedDataGridBaseEx/destroyItemEdi tor()[C:\work\flex\dmv_automat
ion\projects\datavisualisation\src\mx\controls\Adv ancedDataGridBaseEx.as:4742]
at
mx.controls::AdvancedDataGridBaseEx/itemEditorItem EditEndHandler()[C:\work\flex\
dmv_automation\projects\datavisualisation\src\mx\c ontrols\AdvancedDataGridBaseEx
..as:6539]
at flash.events::EventDispatcher/dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0\frameworks\projects\framework\
src\mx\core\UIComponent.as:9156]
at
mx.controls::AdvancedDataGridBaseEx/endEdit()[C:\work\flex\dmv_automation\projec
ts\datavisualisation\src\mx\controls\AdvancedDataG ridBaseEx.as:4787]
at
mx.controls::AdvancedDataGridBaseEx/focusOutHandle r()[C:\work\flex\dmv_automatio
n\projects\datavisualisation\src\mx\controls\Advan cedDataGridBaseEx.as:5839]


Reply With Quote
  #3 (permalink)  
Old 12-01-2008, 12:43 PM
nikos101
 
Posts: n/a
Diggs:
Default Re: The event itemFocusOut gets called twice when theregex passes.

I got round this error by doing this:

if((event.itemRenderer as TextInput).text != ""){
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk