<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="808" height="484" viewSourceURL="srcview/index.html"
xmlns:com="*">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.ArrayCollection;
import mx.core.IFlexDisplayObject;
import mx.containers.TitleWindow;
import mx.managers.PopUpManager;
[Bindable]
public var status:ArrayCollection = new ArrayCollection(
[ {label:"Pending", data:1},
{label:"Fail P1", data:2},
{label:"Fail P2", data:3},
{label:"Fail P3", data:4},
{label:"Pass", data:5},
{label:"NA", data:6},
{label:"Waived", data:7} ]);
[Bindable]
private var dpFlat:ArrayCollection = new ArrayCollection([
{Category:"Analog Display", Territory:"DAC",
Territory_Rep:"DACA_VDD is connected to 3.3V +/- 5%", Actual:38865, Last_Response:40000},
{Category:"Analog Display", Territory:"DAC",
Territory_Rep:"Follow DG Table 7-3 for DAC power filtering (Ref:REF:Joe5)", Actual:38865, Last_Response:40000},
{Category:"Analog Display", Territory:"DAC",
Territory_Rep:"DACA_VREF requires a 0.1uF capacitor to GND", Actual:38865, Last_Response:40000},
{Category:"Analog Display", Territory:"DAC",
Territory_Rep:"DACA_RSET is pulled down with a 124 Ohm 1% resistor", Actual:38865, Last_Response:40000},
{Category:"Clock and PLL", Territory:"Clock",
Territory_Rep:"Place a 22Ohm resistor in series if XTALSSIN is connected to an external device", Actual:38865, Last_Response:40000},
]);
[Bindable]
private function callPopup():void{
var pop:TitleWindow = TitleWindow(PopUpManager.createPopUp(this,userentry,true));
}
]]>
</mx:Script>
<mx:Panel title="Schematic"
height="421" width="742" layout="horizontal"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:AdvancedDataGrid id="myADG"
width="100%" height="100%"
initialize="gc.refresh();">
<mx:dataProvider>
<mx:GroupingCollection id="gc" source="{dpFlat}">
<mx:grouping>
<mx:Grouping>
<mx:GroupingField name="Category" />
<mx:GroupingField name="Territory"/>
<mx:GroupingField name="Territory_Rep"/>
</mx:Grouping>
</mx:grouping>
</mx:GroupingCollection>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Category" width="400"/>
<mx:AdvancedDataGridColumn dataField="Territory" headerText="">
<mx:itemRenderer>
<mx:Component>
<mx:Image source="images/globe.png" mouseMove="callPopup()"/>
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn dataField="Territory_Rep"
headerText=""/>
<mx:AdvancedDataGridColumn dataField="Actual" headerText="">
<mx:itemRenderer>
<mx:Component>
<mx:ComboBox dataProvider="{status}"/>
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn dataField="Last_Response" width="350" headerText="Last Response"/>
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Panel>
</mx:Application>
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
by: zzynxPosted on 2009-11-03 at 04:46:32ID: 25728362
Those errors are linked with the place those lines are.
id{ reatePopUp (this, null ,true));
t)}"/>
If eg. you set a copy of this line
<mx:ComboBox dataProvider="{status}"/>
before
<mx:AdvancedDataGrid id="myADG" ...
it compiles without any problems.
But I don't know (yet) how to solve it.
Remarks:
[1]
callPopup() doesn't need to be Bindable but must have a parameter:
public function callPopup(e:MouseEvent):vo
var pop:TitleWindow = TitleWindow(PopUpManager.c
}
You then use it as
<mx:Image source="images/globe.png" mouseMove="{callPopup(even
[2]
Instead of
>> <mx:Image source="images/globe.png" mouseMove="callPopup()"/>
You'll probably need to use the pair mouseOver/mouseOut to make the popup appear/disappear