Search Results

Search found 200 results on 8 pages for 'dataprovider'.

Page 4/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Flex Canvas child Randomly resizes

    - by BS_C3
    Hi! I have an application with a viewstack that contains all the components that need to be displayed. The navigation is defined in the main application. All the components are based on canvas. The main application looks like that: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:components="components.*"> <mx:VBox width="1024" height="100%" horizontalCenter="0" verticalGap="0" backgroundColor="#FFFFFF"> <mx:Image id="header" verticalAlign="top" /> <mx:ViewStack id="body" horizontalCenter="0" verticalCenter="0" width="100%" height="100%"> <components:HomePage id="hp" width="100%"/> <components:CollectionSelection id="cs" width="100%"/> <components:SearchEngine id="se" width="100%"/> <components:SearchResult id="sr" width="100%"/> <components:Tray id="tr" width="100%"/> <components:Order id="or" width="100%"/> </mx:ViewStack> <mx:Image id="footer" verticalAlign="bottom" maintainAspectRatio="false" width="100%"/> </mx:VBox> </mx:Application> I'm getting a strange behaviour from the TRAY component. Here's the code for component Tray (I've only left the display info): <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Image id="bg" horizontalCenter="0" verticalCenter="0" width="100%" height="100%" maintainAspectRatio="false"/> <mx:HBox width="100%"> <mx:Button x="20" y="20" label="BACK"/> <mx:Spacer width="100%"/> <mx:LinkBar itemClick="linkbar_itemClick(event)" styleName="GLBLinkBTN" separatorColor="#FFFFFF" separatorWidth="1" > <mx:dataProvider> <mx:Object label="CLEAR"/> <mx:Object label="LOGOUT"/> </mx:dataProvider> </mx:LinkBar> </mx:HBox> <mx:VBox id="mainBox" horizontalCenter="0" verticalCenter="0" verticalGap="0"> <mx:HBox width="100%" height="50" backgroundColor="#60524D" verticalAlign="bottom" paddingBottom="5"> <mx:Label styleName="TRTitle" paddingLeft="15"/> <mx:Spacer width="100%"/> <mx:Label styleName="TRItems" paddingRight="15"/> </mx:HBox> <mx:HorizontalList id="hlist" dataProvider="{TrayData.instance.itemsCollection}" columnCount="{TrayData.instance.hlistColumns}" rowCount="1" itemRenderer="components.TrayItem" horizontalScrollPolicy="off" rollOverColor="#FFFFFF" selectionColor="#FFFFFF" horizontalCenter="0" verticalCenter="0" borderStyle="none" horizontalScrollPosition="{TrayData.instance.hsPosition}" /> <mx:HBox width="100%" backgroundColor="#E7DDDB" height="40" verticalAlign="middle" paddingLeft="20" paddingRight="20"> <mx:Box width="25" verticalAlign="middle" horizontalAlign="left"> <mx:Button id="leftBtn" /> </mx:Box> <mx:Spacer width="100%"/> <mx:Box width="25" verticalAlign="middle" horizontalAlign="right"> <mx:Button id="rightBtn" /> </mx:Box> </mx:HBox> </mx:VBox> </mx:Canvas> All the components are displaying properly. However, sometimes, randomly, the vbox "mainBox" in the tray component is not displaying as it should: the horizontallist shrinks and instead of fully displaying its items, I get horizontal and vertical scrollbars for each item... I'm currently trying to reproduce this behaviour (to get a print screen) but right know, it's working fine... -_-' As soon as I get it work as it shouldn't, I'll upload an image. Here's the code for the itemRenderer (just in case...): <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" > <mx:HBox width="100%" paddingTop="0" paddingBottom="0" paddingRight="3"> <mx:Spacer width="100%"/> <mx:Box width="14" height="14" verticalAlign="middle" horizontalAlign="center"> <mx:Button width="8" height="8"/> </mx:Box> </mx:HBox> <mx:VBox paddingLeft="20" paddingRight="20" verticalGap="15" paddingBottom="15"> <mx:Canvas id="thumbnail"> <mx:Image id="thumbnailBG" /> <mx:Image id="thumbnailIM" /> </mx:Canvas > <mx:VBox width="100%" verticalGap="7"> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label paddingBottom="5"/> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74"opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> <mx:HBox width="100%" height="13"> <mx:Label width="74" opaqueBackground="#ECE5E2"/> <mx:Label /> </mx:HBox> </mx:VBox> <mx:Button /> </mx:VBox> </mx:VBox> Your help would really be appreciated. Regards, BS_C3

    Read the article

  • Flex: Create custom stroke on LineSeries?

    - by John Isaacks
    You can easily set a stroke on a line series like this: <mx:LineSeries yField="apple"> <mx:lineStroke> <mx:Stroke color="0x6699FF" weight="4" alpha=".8" /> </mx:lineStroke> </mx:LineSeries> This will set alpha for the entire stroke to .8 But I want to be able to set a different alpha on the stoke for each plot based on something in the dataProvider. For example the yField in the lineSeries is "Apple" which is how it knows where to plot for the lineSeries. I want to be able to add something like alphaField which tells it what to set the stroke alpha for each plot. so if my dataProvider was: <result month="Jan-04"> <apple>81768</apple> <alpha>1</alpha> </result> <result month="Feb-04"> <apple>51156</apple> <alpha>1</alpha> </result> <result month="Mar-04"> <apple>51156</apple> <alpha>.5</alpha> </result> And I set alphaField="alpha" then I would have a solid stroke from plot 0 to plot 1 and then a 50% alpha stroke from plot 1 to plot 2. How can I do this??? I am looking in the commitProperties() and updateDisplayList() methods of LineSeries and have no idea what would need to be added/changed to make this? I am pretty sure, this class has to use Graphics.lineTo() to draw each plot, so basically it would need to "get" the current alphaField value somehow, and apply a Graphics.lineStyle() with the correct alpha before drawing each line. Thanks!! UPDATE I have gotten much closer to my answer. When I extend LineRenderer I override updateDisplayList() which calls GraphicsUtilities.drawPolyLine() I extend GraphicsUtilities and override the method drawPolyLine() as this is where the line is actually drawn. I can call lineStyle() in here and change the alpha of the line... I still have 1 thing I cannot figure out, from within the drawPolyLine() method how can I access that data that dictates what the alpha should be? Thanks!!!!

    Read the article

  • Flex/Flash 4 datagrid literally displays XML

    - by Setori
    Problem: Flex/Flash4 client (built with FlashBuilder4) displays the xml sent from the server exactly as is - the datagrid keeps the format of the xml. I need the datagrid to parse the input and place the data in the correct rows and columns of the datagrid. flow: click on a date in the tree and it makes a server request for batch information in xml form. Using a CallResponder I then update the datagrid's dataProvider. [code] <fx:Script> <![CDATA[ import mx.controls.Alert; [Bindable]public var selectedTreeNode:XML; public function taskTreeChanged(event:Event):void { selectedTreeNode=Tree(event.target).selectedItem as XML; var searchHubId:String = selectedTreeNode.@hub; var searchDate:String = selectedTreeNode.@lbl; if((searchHubId == "") || (searchDate == "")){ return; } findShipmentBatches(searchDate,searchHubId); } protected function findShipmentBatches(searchDate:String, searchHubId:String):void{ findShipmentBatchesResult.token = actWs.findShipmentBatches(searchDate, searchHubId); } protected function updateBatchDataGridDP():void{ task_list_dg.dataProvider = findShipmentBatchesResult.lastResult; } ]]> </fx:Script> <fx:Declarations> <actws:ActWs id="actWs" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <s:CallResponder id="findShipmentBatchesResult" result="updateBatchDataGridDP()"/> </fx:Declarations> <mx:AdvancedDataGrid id="task_list_dg" width="100%" height="95%" paddingLeft="0" paddingTop="0" paddingBottom="0"> <mx:columns> <mx:AdvancedDataGridColumn headerText="Receiving date" dataField="rd"/> <mx:AdvancedDataGridColumn headerText="Msg type" dataField="mt"/> <mx:AdvancedDataGridColumn headerText="SSD" dataField="ssd"/> <mx:AdvancedDataGridColumn headerText="Shipping site" dataField="sss"/> <mx:AdvancedDataGridColumn headerText="File name" dataField="fn"/> <mx:AdvancedDataGridColumn headerText="Batch number" dataField="bn"/> </mx:columns> </mx:AdvancedDataGrid> [/code] I cannot upload a pic, but this is the xml: [code] 2010-04-23 16:35:51.0 PRESHIP 2010-02-15 00:00:00.0 100000009 DF-Ocean-PRESHIPSUM-Quanta-PACT-EMEA-Scheduled Ship Date 20100215.csv 10053 [/code] and the xml is pretty much displayed exactly as is in the datagrid columns... I would appreciate your assistance.

    Read the article

  • Flex Menu Flickering

    - by Dhana
    I am updating MenuBar dataprovider xml dynamically, but each time xml is updated the menu is flickering... Is there any way to avoid this... I am using MX::MenuBar in Flex 4.

    Read the article

  • Flex - communicating between Itemrenderes in a single row.

    - by TheCoolestSid
    Hi, I have a datagrid with an XML object as dataprovider. There are 2 columns in the datagrid which have comboboxes as their itemrenderers. The rendereriseditor property is also marked true. These itemrenderers are defined in their own mxml files. What i want is if the user selects a particular item in the combobox, say NA, then the value of the other combobox should also become NA. How can i achieve such a behavior? Thanks Sid

    Read the article

  • Creating a column of RadioButtons in Adobe Flex

    - by adnan
    I am having an un-predictable behavior of creating radio buttons in advancedDataGrid column using itemRenderer. Similar kind of problem has been reported at http://stackoverflow.com/questions/112036/creating-a-column-of-radiobuttons-in-adobe-flex. I tried to use the same procedure i.e. bind every radio button selectedValue and value attributes with the property specified in the property of the associated bean but still facing the problem. The button change values! The selected button becomes deselected, and unselected ones become selected. Here is the code of my advancedDataGrid: <mx:AdvancedDataGrid id="adDataGrid_rptdata" width="100%" height="100%" dragEnabled="false" sortableColumns="false" treeColumn="{action}" liveScrolling="false" displayItemsExpanded="true" > <mx:dataProvider> <mx:HierarchicalData source="{this.competenceCollection}" childrenField="competenceCriteria"/> </mx:dataProvider> <mx:columns> <mx:AdvancedDataGridColumn headerText="" id="action" dataField="criteriaName" /> <mx:AdvancedDataGridColumn headerText="Periode 1" dataField="" width="200"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center" width="100%" verticalAlign="middle"> <mx:RadioButton name="period1" value="{data}" selected="{data.period1}" group="{data.radioBtnGrpArray[0]}" visible="{data.showRadioButton}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> <mx:AdvancedDataGridColumn headerText="Periode 2" dataField="" width="200"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center" width="100%" verticalAlign="middle"> <mx:RadioButton name="period2" value="{data}" selected="{data.period2}" group="{data.radioBtnGrpArray[1]}" visible="{data.showRadioButton}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> <mx:AdvancedDataGridColumn headerText="Periode 3" dataField="" width="200"> <mx:itemRenderer> <mx:Component> <mx:HBox horizontalAlign="center" width="100%" verticalAlign="middle"> <mx:RadioButton name="period3" value="{data}" selected="{data.period3}" group="{data.radioBtnGrpArray[2]}" visible="{data.showRadioButton}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> </mx:columns> </mx:AdvancedDataGrid> Any work around is highly appreciated in this regard!

    Read the article

  • Flex: Using NumericStepper as an itemEditor in a DataGrid

    - by AlexH
    I am trying to make one field in a datagrid editable with a numeric stepper. My current attempts look like they are working, but the dataProvider is not actually being changed. Based on what I have read in a billion different places, the syntax should be < mx:DataGridColumn dataField="a" itemRenderer="mx.controls.NumericStepper" rendererIsEditor="true" editorDataField="value" / > I have tried several variations on this theme, and nothing seems to work. What am I missing?

    Read the article

  • In Flex, how to drag a component into a column of DataGrid (not the whole DataGrid)?

    - by Yousui
    Hi guys, I have a custom component: <?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Declarations> </fx:Declarations> <fx:Script> <![CDATA[ [Bindable] public var label:String = "don't know"; [Bindable] public var imageName:String = "x.gif"; ]]> </fx:Script> <s:HGroup paddingLeft="8" paddingTop="8" paddingRight="8" paddingBottom="8"> <mx:Image id="img" source="assets/{imageName}" /> <s:Label text="{label}"/> </s:HGroup> </s:Group> and a custom render, which will be used in my DataGrid: <?xml version="1.0" encoding="utf-8"?> <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" focusEnabled="true" xmlns:components="components.*"> <s:VGroup> <components:Person label="{dataGridListData.label}"> </components:Person> </s:VGroup> </s:MXDataGridItemRenderer> This is my application: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:services="services.*"> <s:layout> <s:VerticalLayout/> </s:layout> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.controls.Image; import mx.rpc.events.ResultEvent; import mx.utils.ArrayUtil; ]]> </fx:Script> <fx:Declarations> <fx:XMLList id="employees"> <employee> <name>Christina Coenraets</name> <phone>555-219-2270</phone> <email>[email protected]</email> <active>true</active> <image>assets/001.png</image> </employee> <employee> <name>Joanne Wall</name> <phone>555-219-2012</phone> <email>[email protected]</email> <active>true</active> <image>assets/002.png</image> </employee> <employee> <name>Maurice Smith</name> <phone>555-219-2012</phone> <email>[email protected]</email> <active>false</active> <image>assets/003.png</image> </employee> <employee> <name>Mary Jones</name> <phone>555-219-2000</phone> <email>[email protected]</email> <active>true</active> <image>assets/004.png</image> </employee> </fx:XMLList> </fx:Declarations> <s:HGroup> <mx:DataGrid dataProvider="{employees}" width="100%" dropEnabled="true"> <mx:columns> <mx:DataGridColumn headerText="Employee Name" dataField="name"/> <mx:DataGridColumn headerText="Email" dataField="email"/> <mx:DataGridColumn headerText="Image" dataField="image" itemRenderer="renderers.render1"/> </mx:columns> </mx:DataGrid> <s:List dragEnabled="true" dragMoveEnabled="false"> <s:dataProvider> <s:ArrayCollection> <fx:String>aaa</fx:String> <fx:String>bbb</fx:String> <fx:String>ccc</fx:String> <fx:String>ddd</fx:String> </s:ArrayCollection> </s:dataProvider> </s:List> </s:HGroup> </s:Application> Now what I want to do is let the user drag an one or more item from the left List component and drop at the third column of the DataGrid, then using the dragged data to create another <components:Person /> object. So in the final result, maybe the first line contains just one <components:Person /> object at the third column, the second line contains two <components:Person /> object at the third column and so on. Can this be implemented in Flex? How? Great thanks.

    Read the article

  • invalidateList(); in flex3.0

    - by Ankur Sharma
    please tell me what invalidateList(); function does? i have one line of code, in which this function is getting called on arraycollection object like dg.invalidateList(); where dg is the id of datagrid, dataprovider for this dg is colors which is an arraycollection?? plzz tell me wht the invalidateList() function is doin? thanx

    Read the article

  • Dynamic populate ComboBox (Flex)

    - by Vinzcent
    Hey, I want to populate a ComboBox after a clicked a button. This is my code: var dpNames:ArrayCollection = new ArrayCollection(); for each(var ca:Categorie in arrCategories) { dpNames.addItem ({label: ca.name, data: ca.value}); } cbWijzigCategorie.dataProvider = dpNames; But when he executes the last line, I alwas get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. I have no idea why. Thanks a lot, Vincent

    Read the article

  • FLEX: Hillelcoren - AutoComplete (I cannot use searchText attribute)

    - by Patrick
    hi, I'm using hillelcoren:AutoComplete component (hillelcoren.com/flex-autocomplete) in my Flex application. It is really cool, however the text attribute doesn't work: <hillelcoren:AutoComplete id="filterTag" dataProvider="{ dataManager.retrievedTagsList }" labelField="name" keyUp="filterItems(filterTag.searchText)" /> while for the normal TextInput component it works: <mx:TextInput id="filterTag" width="100%" keyUp="filterItems(filterTag.text)" /> 1) I've tried keyUp="Alert.show(filterTag.searchText)" and I can read the text 2) I've tried filterItems(filterTag.text.toString())... still not working 3) the filterItems function works, because it works with a normal TextInput thanks

    Read the article

  • Flex 3: creationComplete alert in repeater... question about getting repeater.currentIndex

    - by Brds
    I have a repeater to call a child... my code is as follows: <mx:Repeater id="projectRP" dataProvider="{projectsHttp.lastResult.project}"> <Block:project id="wholeProject" projectID="{projectRP.currentIndex}" workingTitle="{projectRP.currentItem.workingTitle}" projectTitle="{projectRP.currentItem.projName}" startDate="{textToDate(projectRP.currentItem.startDate)}" projectPositions="{XML(projectRP.currentItem.positions)}" creationComplete="Alert.show(String(projectRP.currentIndex))" /> </mx:Repeater> For some reason, the creationComplete piece isn't s

    Read the article

  • Tool to check if XML is valid in my VS2012 comments

    - by davidjr
    I am writing the documentation for our companies software developed with vs2012. I need to add xml examples to the summary of each class, due to xml instantiation of objects. We are using sandcastle to create the documentation (company choice), and I want to be able to review my xml comments without building the help file every time. Is there an application that anyone would recommend where I can view how the xml renders before I build the help file? Here is my example: /// <summary> /// Performs DFT on a data array, writes output in a CSV file. /// </summary> /// <example> /// <para>XML declaration</para> /// <code lang="xml" xml:space="preserve"> /// %lt;DataProvider name="DftDP" description="Computes DFT" etc... I want to check the XML to make sure it is valid, maybe by copy and pasting it into a tool of some sort?

    Read the article

  • Is it OK to introduce methods that are used only during unit tests?

    - by Mchl
    Recently I was TDDing a factory method. The method was to create either a plain object, or an object wrapped in a decorator. The decorated object could be of one of several types all extending StrategyClass. In my test I wanted to check, if the class of returned object is as expected. That's easy when plain object os returned, but what to do when it's wrapped within a decorator? I code in PHP so I could use ext/Reflection to find out a class of wrapped object, but it seemed to me to be overcomplicating things, and somewhat agains rules of TDD. Instead I decided to introduce getClassName() that would return object's class name when called from StrategyClass. When called from the decorator however, it would return the value returned by the same method in decorated object. Some code to make it more clear: interface StrategyInterface { public function getClassName(); } abstract class StrategyClass implements StrategyInterface { public function getClassName() { return \get_class($this); } } abstract class StrategyDecorator implements StrategyInterface { private $decorated; public function __construct(StrategyClass $decorated) { $this->decorated = $decorated; } public function getClassName() { return $this->decorated->getClassName(); } } And a PHPUnit test /** * @dataProvider providerForTestGetStrategy * @param array $arguments * @param string $expected */ public function testGetStrategy($arguments, $expected) { $this->assertEquals( __NAMESPACE__.'\\'.$expected, $this->object->getStrategy($arguments)->getClassName() ) } //below there's another test to check if proper decorator is being used My point here is: is it OK to introduce such methods, that have no other use than to make unit tests easier? Somehow it doesn't feel right to me.

    Read the article

  • Flex 4, chart, Error 1009

    - by Stephane
    Hello, I am new to flex development and I am stuck with this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.charts.series::LineSeries/findDataPoints()[E:\dev\4.0.0\frameworks\projects\datavisualization\src\mx\charts\series\LineSeries.as:1460] at mx.charts.chartClasses::ChartBase/findDataPoints()[E:\dev\4.0.0\frameworks\projects\datavisualization\src\mx\charts\chartClasses\ChartBase.as:2202] at mx.charts.chartClasses::ChartBase/mouseMoveHandler()[E:\dev\4.0.0\frameworks\projects\datavisualization\src\mx\charts\chartClasses\ChartBase.as:4882] I try to create a chart where I can move the points with the mouse I notice that the error doesn't occur if I move the point very slowly I have try to use the debugger and pint some debug every where without success All the behaviours were ok until I had the modifyData Please let me know if you have some experience with this kind of error I will appreciate any help. Is it also possible to remove the error throwing because after that the error occur if I click the dismiss all error button then the component work great there is the simple code of the chart <fx:Declarations> </fx:Declarations> <fx:Script> <![CDATA[ import mx.charts.HitData; import mx.charts.events.ChartEvent; import mx.charts.events.ChartItemEvent; import mx.collections.ArrayCollection; [Bindable] private var selectItem:Object; [Bindable] private var chartMouseY:int; [Bindable] private var hitData:Boolean=false; [Bindable] private var profitPeriods:ArrayCollection = new ArrayCollection( [ { period: "Qtr1 2006", profit: 32 }, { period: "Qtr2 2006", profit: 47 }, { period: "Qtr3 2006", profit: 62 }, { period: "Qtr4 2006", profit: 35 }, { period: "Qtr1 2007", profit: 25 }, { period: "Qtr2 2007", profit: 55 } ]); public function chartMouseUp(e:MouseEvent):void{ if(hitData){ hitData = false; } } private function chartMouseMove(e:MouseEvent):void { if(hitData){ var p:Point = new Point(linechart.mouseX,linechart.mouseY); var d:Array = linechart.localToData(p); chartMouseY=d[1]; modifyData(); } } public function modifyData():void { var idx:int = profitPeriods.getItemIndex(selectItem); var item:Object = profitPeriods.getItemAt(idx); item.profit = chartMouseY; profitPeriods.setItemAt(item,idx); } public function chartMouseDown(e:MouseEvent):void{ if(!hitData){ var hda:Array = linechart.findDataPoints(e.currentTarget.mouseX, e.currentTarget.mouseY); if (hda[0]) { selectItem = hda[0].item; hitData = true; } } } ]]> </fx:Script> <s:layout> <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle" /> </s:layout> <s:Panel title="LineChart Control" > <s:VGroup > <s:HGroup> <mx:LineChart id="linechart" color="0x323232" height="500" width="377" mouseDown="chartMouseDown(event)" mouseMove="chartMouseMove(event)" mouseUp="chartMouseUp(event)" showDataTips="true" dataProvider="{profitPeriods}" > <mx:horizontalAxis> <mx:CategoryAxis categoryField="period"/> </mx:horizontalAxis> <mx:series> <mx:LineSeries yField="profit" form="segment" displayName="Profit"/> </mx:series> </mx:LineChart> <mx:Legend dataProvider="{linechart}" color="0x323232"/> </s:HGroup> <mx:Form> <mx:TextArea id="DEBUG" height="200" width="300"/> </mx:Form> </s:VGroup> </s:Panel> UPDATE 30/2010 : the null object is _renderData.filteredCache from the chartline the code call before error is the default mouseMoveHandler of chartBase to chartline. Is it possible to remove it ? or provide a filteredCache

    Read the article

  • NHibernate MySQL Composite-Key

    - by LnDCobra
    I am trying to create a composite key that mimicks the set of PrimaryKeys in the built in MySQL.DB table. The Db primary key is as follows: Field | Type | Null | ---------------------------------- Host | char(60) | No | Db | char(64) | No | User | char(16) | No | This is my DataBasePrivilege.hbm.xml file <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="TGS.MySQL.DataBaseObjects" namespace="TGS.MySQL.DataBaseObjects"> <class name="TGS.MySQL.DataBaseObjects.DataBasePrivilege,TGS.MySQL.DataBaseObjects" table="db"> <composite-id name="CompositeKey" class="TGS.MySQL.DataBaseObjects.DataBasePrivilegePrimaryKey, TGS.MySQL.DataBaseObjects"> <key-property name="Host" column="Host" type="char" length="60" /> <key-property name="DataBase" column="Db" type="char" length="64" /> <key-property name="User" column="User" type="char" length="16" /> </composite-id> </class> </hibernate-mapping> The following are my 2 classes for my composite key: namespace TGS.MySQL.DataBaseObjects { public class DataBasePrivilege { public virtual DataBasePrivilegePrimaryKey CompositeKey { get; set; } } public class DataBasePrivilegePrimaryKey { public string Host { get; set; } public string DataBase { get; set; } public string User { get; set; } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != typeof (DataBasePrivilegePrimaryKey)) return false; return Equals((DataBasePrivilegePrimaryKey) obj); } public bool Equals(DataBasePrivilegePrimaryKey other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Host, Host) && Equals(other.DataBase, DataBase) && Equals(other.User, User); } public override int GetHashCode() { unchecked { int result = (Host != null ? Host.GetHashCode() : 0); result = (result*397) ^ (DataBase != null ? DataBase.GetHashCode() : 0); result = (result*397) ^ (User != null ? User.GetHashCode() : 0); return result; } } } } And the following is the exception I am getting: Execute System.InvalidCastException: Unable to cast object of type 'System.Object[]' to type 'TGS.MySQL.DataBaseObjects.DataBasePrivilegePrimaryKey'. at (Object , GetterCallback ) at NHibernate.Bytecode.Lightweight.AccessOptimizer.GetPropertyValues(Object target) at NHibernate.Tuple.Component.PocoComponentTuplizer.GetPropertyValues(Object component) at NHibernate.Type.ComponentType.GetPropertyValues(Object component, EntityMode entityMode) at NHibernate.Type.ComponentType.GetHashCode(Object x, EntityMode entityMode) at NHibernate.Type.ComponentType.GetHashCode(Object x, EntityMode entityMode, ISessionFactoryImplementor factory) at NHibernate.Engine.EntityKey.GenerateHashCode() at NHibernate.Engine.EntityKey..ctor(Object identifier, String rootEntityName, String entityName, IType identifierType, Boolean batchLoadable, ISessionFactoryImplementor factory, EntityMode entityMode) at NHibernate.Engine.EntityKey..ctor(Object id, IEntityPersister persister, EntityMode entityMode) at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) at NHibernate.Impl.SessionImpl.Get(String entityName, Object id) at NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) at NHibernate.Impl.SessionImpl.Get[T](Object id) at TGS.MySQL.DataBase.DataProvider.GetDatabasePrivilegeByHostDbUser(String host, String db, String user) in C:\Documents and Settings\Michal\My Documents\Visual Studio 2008\Projects\TGS\TGS.MySQL.DataBase\DataProvider.cs:line 20 at TGS.UserAccountControl.UserAccountManager.GetDatabasePrivilegeByHostDbUser(String host, String db, String user) in C:\Documents and Settings\Michal\My Documents\Visual Studio 2008\Projects\TGS\TGS.UserAccountControl\UserAccountManager.cs:line 10 at TGS.UserAccountControlTest.UserAccountManagerTest.CanGetDataBasePrivilegeByHostDbUser() in C:\Documents and Settings\Michal\My Documents\Visual Studio 2008\Projects\TGS\TGS.UserAccountControlTest\UserAccountManagerTest.cs:line 12 I am new to NHibernate and any help would be appreciated. I just can't see where it is getting the object[] from? Is the composite key supposed to be object[]?

    Read the article

  • Flex Error: Repeater is not executing.

    - by creativepragmatic
    Hello Everyone, I have been trying to get a Repeater to work since yesterday. It works the first time it has been loaded with data but the second time, it is loaded, the following error results with the debugger higlighting a row with the statement isHandlingEvent = false; in the watcherFired method of the Binding class. This happens whether the Repeater is updated by setting its dataProvider or if a bound variable is changed. Thank you in advance for any help, Orville Error: Repeater is not executing. at mx.core::Repeater/get currentItem()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:305] at ()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\view\Shop.mxml:362] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.binding::Binding/wrapFunctionCall()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:287] at ()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\RepeatableBinding.as:139] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.binding::Binding/wrapFunctionCall()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:287] at mx.binding::RepeatableBinding/recursivelyProcessIDArray()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\RepeatableBinding.as:148] at mx.binding::RepeatableBinding/execute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\RepeatableBinding.as:105] at mx.binding::BindingManager$/executeBindings()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\BindingManager.as:138] at mx.core::Container/executeBindings()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3252] at mx.core::Container/createComponentFromDescriptor()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3726] at mx.core::Container/createComponentsFromDescriptors()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3536] at mx.core::Container/createChildren()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2632] at mx.core::UIComponent/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:5370] at mx.core::Container/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2569] at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:5267] at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3348] at mx.core::Container/addChildAt()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2260] at mx.core::Container/addChild()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2183] at mx.core::Container/createComponentFromDescriptor()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3724] at mx.core::Repeater/createComponentFromDescriptor()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:734] at mx.core::Repeater/createComponentsFromDescriptors()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:786] at mx.core::Repeater/recreate()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:1075] at mx.core::Repeater/execute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:1095] at mx.core::Repeater/set dataProvider()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:402] at ()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\view\Shop.mxml:358] at Function/http://adobe.com/AS3/2006/builtin::call() at mx.binding::Binding/innerExecute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:375] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.binding::Binding/wrapFunctionCall()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:287] at mx.binding::Binding/execute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:230] at mx.binding::Binding/watcherFired()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:396] at mx.binding::Watcher/notifyListeners()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Watcher.as:299] at mx.binding::PropertyWatcher/eventHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:327] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ch.printportal.site.model::ModelLocator/dispatchEvent()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\model\ModelLocator.as:73] at ch.printportal.site.model::ModelLocator/set arrCategoryView2Products()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\model\ModelLocator.as:71] at ch.printportal.site.command::GetProductsCommand/result()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\command\GetProductsCommand.as:47] at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AsyncToken.as:199] at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\events\ResultEvent.as:172] at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:199] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:263] at mx.rpc::Responder/result()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\Responder.as:46] at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] at NetConnectionMessageResponder/resultHandler()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:514] at mx.messaging::MessageResponder/result()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]

    Read the article

  • Flex/PHP/XML data issue

    - by reado
    I have built a simple application in Flex. When the application loads, a GET request is made to the xmlService.php file with parameters "fetchData=letters". This tells the PHP to return the XML code. In Flex Debug I can see the XML data being sent by the PHP to the flex client. What I need it to do is populate the first drop down box (id="letter") with this data, however nothing is being received by Flex. I added an Alert.show() to check what was being returned but when the application runs, the alert is blank. Can anyone help? Thanks in advance. Image: http://static.readescdn.com/misc/flex.gif // Flex <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="300" height="300" creationComplete="windowedapplication1_creationCompleteHandler(event)"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import spark.events.IndexChangeEvent; protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void { var params:Object = {'fetchData':'letters'}; xmlService.send(params); } protected function xmlService_resultHandler(event:ResultEvent):void { var id:String = xmlService.lastResult.data.id.value; //Alert.show(xmlService.lastResult.data.id.value); if(id == 'letter') { letter.dataProvider = xmlService.lastResult.data.letter; letter.enabled = true; } else if(id == 'number') { number.dataProvider = xmlService.lastResult.data.number; number.enabled = true; submit.enabled = true; } else { submit.label = 'No Data!'; } } protected function xmlService_faultHandler(event:FaultEvent):void { Alert.show(event.fault.message); } protected function letter_changeHandler(event:IndexChangeEvent):void { var params:Object = {'fetchData':'numbers'}; xmlService.send(params); } ]]> </fx:Script> <fx:Declarations> <s:HTTPService id="xmlService" url="URL_GOES_HERE" method="POST" useProxy="false" resultFormat="e4x" result="xmlService_resultHandler(event)" fault="xmlService_faultHandler(event)"/> </fx:Declarations> <s:DropDownList x="94" y="10" id="letter" enabled="false" change="letter_changeHandler(event)" labelField="value"></s:DropDownList> <s:DropDownList x="94" y="39" id="number" enabled="false" labelField="value"></s:DropDownList> <s:Button x="115" y="68" label="Submit" id="submit" enabled="false"/> </s:WindowedApplication> // PHP <? if(isset($_POST['fetchData'])) { if($_POST['fetchData'] == 'letters') { $xml = '<data> <id value="letters"/> <letter label="Letter A" value="a"/> <letter label="Letter B" value="b"/> <letter label="Letter C" value="c"/> </data>'; } else if($_POST['fetchData'] == 'numbers') { $xml = '<data> <id value="letters"/> <number label="Number 1" value="1"/> <number label="Number 2" value="2"/> <number label="Number 3" value="3"/> </data>'; } else { $xml = '<data> <result value="'.$_POST['fetchData'].'"/> </data>'; } echo $xml; } else { echo '<data> <result value="NULL"/> </data>'; } ?>

    Read the article

  • convert remote object result to array collection in flex...........

    - by user364199
    HI guys, im using zend_amf and flex. My problem is i have to populate my advance datagrid using array collection. this array collection have a children. example: [Bindable] private var dpHierarchy:ArrayCollection = new ArrayCollection([ {trucks:"Truck", children: [ {trucks:"AMC841", total_trip:1, start_time:'3:46:40 AM'}, {trucks:"AMC841", total_trip:1, start_time:'3:46:40 AM'}]) ]}; but the datasource of my datagrid should come from a database, how can i convert the result from remote object to array collection that has the same format like in my example, or any other way. here is my advance datagrid <mx:AdvancedDataGrid id="datagrid" width="500" height="200" lockedColumnCount="1" lockedRowCount="0" horizontalScrollPolicy="on" includeIn="loggedIn" x="67" y="131"> <mx:dataProvider> <mx:HierarchicalData id="dpHierarchytest" source="{dp}"/> </mx:dataProvider> <mx:groupedColumns> <mx:AdvancedDataGridColumn dataField="trucks" headerText="Trucks"/> <mx:AdvancedDataGridColumn dataField="total_trip" headerText="Total Trip"/> <mx:AdvancedDataGridColumnGroup headerText="PRECOOLING"> <mx:AdvancedDataGridColumnGroup headerText="Before Loading"> <mx:AdvancedDataGridColumn dataField="start_time" headerText="Start Time"/> <mx:AdvancedDataGridColumn dataField="end_time" headerText="End Time"/> <mx:AdvancedDataGridColumn dataField="precooling_time" headerText="Precooling Time"/> <mx:AdvancedDataGridColumn dataField="precooling_temp" headerText="Precooling Temp"/> </mx:AdvancedDataGridColumnGroup> <mx:AdvancedDataGridColumnGroup headerText="Before Dispatch"> <mx:AdvancedDataGridColumn dataField="bd_start_time" headerText="Start Time"/> <mx:AdvancedDataGridColumn dataField="bd_end_time" headerText="End Time"/> <mx:AdvancedDataGridColumn dataField="bd_precooling_time" headerText="Precooling Time"/> <mx:AdvancedDataGridColumn dataField="bd_precooling_temp" headerText="Precooling Temp"/> </mx:AdvancedDataGridColumnGroup> <mx:AdvancedDataGridColumn dataField="remarks" headerText="Remarks"/> </mx:AdvancedDataGridColumnGroup> <mx:AdvancedDataGridColumnGroup headerText="Temperature Compliance"> <mx:AdvancedDataGridColumn dataField="total_hit" headerText="Total Hit"/> <mx:AdvancedDataGridColumn dataField="total_miss" headerText="Total Miss"/> <mx:AdvancedDataGridColumn dataField="cold_chain_compliance" headerText="Cold Chain Compliance"/> <mx:AdvancedDataGridColumn dataField="average_temp" headerText="Average Temp"/> </mx:AdvancedDataGridColumnGroup> <mx:AdvancedDataGridColumnGroup headerText="Productivity"> <mx:AdvancedDataGridColumn dataField="total_drop_points" headerText="Total Drop Points"/> <mx:AdvancedDataGridColumn dataField="total_delivery_time" headerText="Total Delivery Time"/> <mx:AdvancedDataGridColumn dataField="total_distance" headerText="Total Distance"/> </mx:AdvancedDataGridColumnGroup> <mx:AdvancedDataGridColumnGroup headerText="Trip Exceptions"> <mx:AdvancedDataGridColumn dataField="total_doc" headerText="Total DOC"/> <mx:AdvancedDataGridColumn dataField="total_eng" headerText="Total ENG"/> <mx:AdvancedDataGridColumn dataField="total_fenv" headerText="Total FENV"/> <mx:AdvancedDataGridColumn dataField="average_speed" headerText="Average Speed"/> </mx:AdvancedDataGridColumnGroup> </mx:groupedColumns> </mx:AdvancedDataGrid> Thanks, and i really need some help.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >