Adobe Dreamweaver Forums



Last 10 THreads :         Adobe Flash 10 kills Wimpy (Last Post : midiwriter - Replies : 106 - Views : 107 )           »          Em Dash (Last Post : David Stiller - Replies : 1 - Views : 2 )           »          button event with transparency (Last Post : Kruc3fix - Replies : 0 - Views : 1 )           »          Dragging components (Last Post : hsfrey - Replies : 21 - Views : 22 )           »          Scaling .swf files to fit specific dimensions (Last Post : wolfsj - Replies : 2 - Views : 3 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 5 - Views : 6 )           »          Re: Your techiques for removing specular from photos (Last Post : Don_Gough@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : g_ballard@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : Jim_Jordan@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Printing too dark in CS4 (Last Post : Tom_H_Mikkelsen@adobeforums.com - Replies : 0 - Views : 1 )           »         


Left Column Title

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



Reply
  #1 (permalink)  
Old 11-04-2008, 09:02 AM
is2
 
Posts: n/a
Diggs:
Default ComboBox - Setting Selected Values from data

I am running into a problem in Flex 3 that seems to be different from Flex 2.
Maybe someone can help.

I have a function for setting a combobox selected item for a location for a
value when the titlewindow completes loading. The value is a prior value from
a prior save. In other words to set the combobox a value from a prior session.

The locations xml file is loaded from a remote object oncreationcomplete of
the titlewindow. The setselectedvalue function worked perfectly in Flex 2 but
now only works in Flex 2 after the titlewindow is loaded. We tested this by
running the setselectedvalue function from a button click after loading.

The dataprovider length is showing 0 in our debugging. After titlewindow up
on screen the length is showing correct ( 35 ) - in this case. Our
viewxmlobject function is showing no xml. Shows xml correctly after up on
screen.

I have set the creationpolicy to "all". That did not help either.

Any suggestions? Anyone. This is killing me. Spent two days now trying to
get back to working state.


private function SetSelectedValue_cbLocation(): void {
var xLocID:String = eLocationID.text;
//viewXmlObject( cbLocation.dataProvider )

for (var i : int = 0; i < cbLocation.dataProvider.length ; i++) {
//Alert.show( cbLocation.dataProvider[i].locid, 'Location DataProvider',
Alert.OK);
if ( xLocID == cbLocation.dataProvider[i].locid ){
cbLocation.selectedIndex = i;
break;
}
}

}


The combobox has the dataprovider set at design time.

<components:is2ComboBox id="cbLocation" x="585" y="4" width="196"
dataProvider="{xmlLocations.Record}" labelField="locname" dataField="locid"
change="changeLocation(event)" disabledColor="#004080" prompt="1. Please select
location"></components:is2ComboBox>




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:02 AM
rtalton
 
Posts: n/a
Diggs:
Default Re: ComboBox - Setting Selected Values from data

Hard to say without seeing the code. Is the application opening a pop-up window
(the title window)? If so, where is the combo box located? In the main app or
the titleWindow? What calls the SetSelectedValue_cbLocation() function?

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



Right Column Title


© 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 09:57 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.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk