Actionscript 3 :: Flex / Air / Selecting And Populating A UnFocused Tab
Apr 5, 2010
I'm having a problem displaying data from a function to text box within a tab. If you run the code and click "Select Tab 2 and Fill..." I get an error; "TypeError: Error #1009: Cannot access a property or method of a null object reference." I'm guessing this is because "Tab 2" is/was not rendered yet. Now if I run the code, select "Tab 2" then select "Tab 1" and click "Select Tab 2 and Fill..." it works the way I would like. Dose any one know a way around this problem.
I am trying to find out how to continue to receive keyboard input to my app when the app is not focused. For example, if I dock my app to the system tray, is there a way to continue to receive keyboard input to be fed to the app?
I am creating a RSS Feed application based on a data, and I have the following:
I have an ArrayCollection that is pre-populated with data. I am sorting through the ArrayCollection, get 1 piece of data (condition), and need to connect to an RSS feed which returns me the title, and I set my ArrayCollection in correspondence to condition -> title.
public function updateArrayList(list:ArrayCollection):ArrayCollection { trace(list); for(var i:int = 0; i < list.length; i++) { //Alert.show(list.getItemAt(i).condition);
where the component before / represents parent and the children of the corresponding parent are separated by , Can anyone provide me the logic to create a array collection for this hierarchy to set as dataprovider to my tree.
In the below code.If buttom 'A' is pressed the text box should be populated with A, and if button 'B' is pressed it should be populated with B and so on..
What is the best way to populate a multiple Comboboxes when using Flex 4.5 and PHP 5?
I am developing a Flex app that displays about 20 Comboboxes on the screen - each combo showing different data. I would like all of the comboboxes to be populated at once when the app starts. I used the default "Data/Service" wizard in Flex that automatically creates the PHP that returns an ArrayCollection to Flex. For example, below is the current PHP function I use that populates each ComboBox:
public function getListsByCODE($code) { $stmt = mysqli_prepare($this->connection, "SELECT a.IDCODE, a.CODE, a.DESCR, a.NOTES FROM DROPDOWN_VW a WHERE (a.CODE = ?)"); $this->throwExceptionOnError();
I have a flex mobile application that I am working on that I am having issues with selecting an image from roll/taking a picture. My application is not tabbed, however one part of it contains a Tabbed View Navigator with tabs across the bottom. Within one of those tabs, I have the ability to upload an image to a webservice that I have created. However, when I select an image or take the picture, it pops back out to the initial splash screen and the application restarts. If I use the component standalone (outside of the tabbed view navigator) it selects the image and uploads without any problem.
I am passing a complex object from my .NET library to my Flex application via WebOrb.In order to automatically translate, I am using the [RemoteClass] meta data tag as follows:[code]This works absolutely fine, until I try to extend the Plan class to contain an array of complex items:[code]but the set function never gets called.What can I do to get the children into my Flex app in this way?
I only need the Title and Updated fields to actually be loaded into the DataGrid. This clearly doesn't work, (I think it's related to result.entry, that it must be something else like result.feed.entry, but I've tried a number of combinations and they haven't worked
I'm having trouble getting an AdvancedDataGrid to populate properly within an app I'm working on.If I use the sample code found on this page http:[url].... in it's own page everything works fine but if I copy this code into the page within my app that needs to have the grid the column headers/data are not populated.The page that needs the grid is displayed within a Spark NavigatorContent element, I'm not sure if this could somehow adversely effect the AdvancedDataGrid behaviour.I've even simplified the contained page to have just the sample code without anything else and it still does not work. info needed here,
EDIT: Some code sample from the project:
//Code from 'main page' containing the NavigatorContent <mx:ViewStack id="viewstack1" cornerRadius="12" dropShadowVisible="false"> <s:NavigatorContent label="Matrix View" backgroundColor="#FFFFFF">[code]...............
In ActionScript I have string as str="subject,r1,r2:a,b:1,2:3,4"; Dynamically I have split this string and build array collection as given below arraycoll.addItem({subject:a ,r1:1,r2:3}); This example of one set. The array collection should be built dynamic. I have tried but not successful.
I'm trying to select the id of a textArea when it's focused in
[Code]...
Problem is TextArea is made up of RichEditableText so target doesn't actually refer to TextArea. I've tried event.target.parent.id but still not getting there. Anyone knows how to get to the bottom of this?
I've created an Flex app. It currently has an drop down menu. With the option to select a Channel. Once the channel is selected the data pulls through. But, what I want to do is just pull through one channel of data as opposed to multiple items of data. How can I achieve this?
My code is quite simple at the moment and looks like this :
I've followed the Flex in a week example, with the drop down menu that pairs the XML data to the XML node set.For the project I am creating, I am just pulling through ONE XML file containing just one node into my application.I am using HTTPService and pulling the data through, but at present the only way for this to work is by using the <s:DropDownList>[code]
My goal is to create a generic function that selects a value in a combobox according to a value. (My comoBox holds arrayCollection as dataProvider.) The difficulty is infact to get a propertyname in runtime mode.
public function selectComboByLabel(combo:ComboBox , propetryName:String, value:String):void { var dp:ArrayCollection = combo.dataProvider as ArrayCollection; for (var i:int=0;i<dp.length;i++) { if (dp.getItemAt(i).propertyName==value) { combo.selectedIndex = i; return; }}}
The line if (dp.getItemAt(i).propertyName==value) is of course incorrect. It should be arther something like: dp.getItemAt(i).getPropertyByName(propertyName)
I have a datagrid with 5 columns. The first column has checkboxs and rest four columns have data from the dataProvider.
I have two relating issues: First: I want the row to get selected when I click on a checkbox, or if i click on multiple checkboxes, every row should stay selected in the datagrid for whose checkbox is selected.
Second: If a row or multiple rows are selected, the corresponding checkbox should get selected too.
I have posted two problems with a custom itemRenderer see this post. My primary Problem is, that it always selects a wrong line (one under the one I select). I now realized that this happens, when I save back the content of the itemRenderer to the dataProvider. If I code this part out, the dataGrid works as expected...
Output: texta textb Now I want to select from "ta" in TextField1 to "tex" in TextField2. By the drag of a mouse. I know that by conventional methods it is not possible? Is there any other way to achieve this? And I need to highlight the text also.
I am trying to figure out how to manage a Datagrid based on an XML object like this:
[Code]...
I will need to populate the Datagrid column names based on a different XML object and use the above XML to populate each of the column's rows. I currently am able to create the Datagrid and populate its column headers but I am unsure as to how to how to add the rows for each column. The above XML will be update with new row and column elements added and deleted. This, of course, will be bound to the Datagrid to show updates.
I have a Datagrid in Flex. I need to add a radio button in first column such that when I select that radio button, entire row should get selected.I have tried using following code -
I need to create an application in which we are changing the style of the application that is theme of the application based on the button click.
I have download the theme that all contains different CSS file. I need to dynamically declare the CSS for the application to apply that theme. I have file name Theme1.css, Theme2.css, Theme3.css, Theme4.css, Theme5.css.
when I click on the Theme 1 Button then I need to apply Theme1.css file as source of style. similar like that when I click on the Theme 2 Button then I need to apply Theme2.css file as source of style. Note : css file contains Style for both application and component of the Application.
1> First column of datagrid has a checkbox. 2> Select checkboxes, and then delete the datagrid column. 3> Dynamically, add checkbox when row is added dynamically. 4> Do not show check box if now data in row.
Inside a datagrid, I essentially want to create a "download button" itemrenderer to the right of the name of a downloadable object, resulting in something like the following link: [URL]
The download function operates upon the currently selected row and is called when one of the download buttons is clicked. Therefore, I am wondering if anybody knows of a way to select the row the itemrenderer button is contained within as the active row when one of the download buttons is clicked.
I have an array of items that should be selected in my tree control. As you can see from my code below, I bind this array to the selectedIndices property of the tree. The selected Items are not properly selecting in tree(selecting some other items and always root is selected).Flex seems to "ignore" my items (selects some other indices).
My XMLList:- <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> <fx:XMLList id="XMLList"> <node><node name="max"> [Code] .....
The Following code seems to only be working when i have editable="true" on the Advanced Data Grid. But I don't want it it be editable.
The docs don't say anything about it needing to be editable, and i dont see why it should need to be.
[URL]
a_data_list.addEventListener(AdvancedDataGridEvent.ITEM_FOCUS_IN, clickedRow); public function clickedRow(event:AdvancedDataGridEvent):void { trace("datagrid line was clicked"); }
I am trying to use the load method of FileReference object to load the data and use it to display a thumbnail of the selected image.However, after calling fr.load(), fr.data remains null.I'm using Flex Builder 3.0.2 on Windows 7 with Flex SDK 3.4 and Flash Player 10 Debug. If I evaluate fr.load() in Eclipse's watch variables list, I get an error reading "No such variable: load."
I have brought in an XML document into Flash (AS3), and can pull any string that I need to into the output window. That is all fine and good - but what I need to do is set var values to be used later.
This outputs what I want, but the problem is: if I try and trace newVar our assign another variable the value of newVar outside of the processXML function, it isnt there.