Question

Tree Control - Access issue

Asked by: su04

Hi,
I'm using Tree Control in my application but facing some issues.

In line 69, I'm getting below error.
1180: Call to a possibly undefined method callPopup.

In line 81, I'm getting below error.
1120: Access of undefined property status.

Please suggest, how can I remove these error.

Finally, Please have a look in screen shot , this is how my screen look like.

I don't want to show images (second column) at each level, I want to show this at file level only not at folder level.

Please help me on all these.

SU

<?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:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-11-02 at 17:31:33ID24865887
Topic

Adobe Flex

Participating Experts
1
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Data Tree
    I want to know with what product I can build a data tree like the one MSDN has on a WebPage, if is there a code example for it.... Thanks
  2. Tree Control
    I am using Tree Control in my VC++5.0 application,But there is no multiple selection in it,so what can I do?
  3. Tree View in Coldfusion with javascript
    Hi Friends I need to build a multi level tree structure for my application (i dont want to use cfftree tag) with javascript which should be a database driven . If anyone have the code with u pls help me out.
  4. Tree
    I Have a problem. i want to display the databse record in asp page in tree like structure using tree view and list view controls of vb but i don't know how to use these controls in vb. Please write complete solution of how to use these controls in asp to display database reco...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: zzynxPosted on 2009-11-03 at 04:46:32ID: 25728362

Those errors are linked with the place those lines are.
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):void{
        var pop:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, null ,true));
}

You then use it as

<mx:Image source="images/globe.png" mouseMove="{callPopup(event)}"/>

[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

 

by: su04Posted on 2009-11-03 at 10:22:55ID: 25731830

Thanks for ur valuable suggestion but after making above changes in image control I'm still getting "1180: Call to a possibly undefined method callPopup." error.

Seems, I'm facing lots of problem with the approach I am following.

Actually, I want to create application look like in screen shot but this approach seems not ok. Can you please have a look on my code and suggest some simple approach for it.

One more thing I want to tell that I've one XML file already containing all the data that needs to be shown in application , so please please suggest me how can I use this XML too?

Thanks for kind help.

Su

 

by: su04Posted on 2009-11-03 at 22:23:51ID: 25736889

Hi,

I've almost solved all problems associated with this application except one, here it is..

I'm calling callPopUp() method on MouseMove event of Component Image but I'm getting compilation error "1180: Call to a possibly undefined method callPopup."

Please help me to solve this problem. Its very urgent.

Thanks in Advance.

<mx:Script>
		<![CDATA[
public function callPopUp(e:MouseEvent):void
			{
            	 var pop:TitleWindow = TitleWindow(PopUpManager.createPopUp(this,userentry,true)); 
            }
               
		]]>
	</mx:Script> 

<mx:AdvancedDataGrid id="frameworkGrid" dataProvider="{argumentData}" variableRowHeight="true" top="{descriptionText.height+21}" right="20" bottom="10" left="20">
		<mx:columns>
<mx:AdvancedDataGridColumn dataField="@image" headerText="" width="25" >
				<mx:itemRenderer>
                   <mx:Component>
                   		<mx:Image source="@image" mouseMove="{callPopup(event)}"/>
                   </mx:Component>
                </mx:itemRenderer>	
			</mx:AdvancedDataGridColumn>
</mx:columns>
	</mx:AdvancedDataGrid>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:

Select allOpen in new window

 

by: zzynxPosted on 2009-11-03 at 23:46:37ID: 25737197

How did you selove the "status" problem? (By leaving it out?)

>> Please help me to solve this problem.
As I said, if you move this line of code

     <mx:Image source="@image" mouseMove="{callPopup(event)}"/>

outside the itemRenderer and the AdvancedDataGrid, it compiles without errors.

So, it's correct.
So it has something to do with the fact that it is embedded
inside a Component
inside an item renderer
inside an AdvancedDataGridColumn
inside an AdvancedDataGrid.

So far I don't hav any clue on how to solve it...

 

by: zzynxPosted on 2009-11-04 at 00:20:35ID: 25737331

Here's a solution:

Replace your column lines by this:

       <mx:AdvancedDataGridColumn dataField="@image" headerText="" width="25" itemRenderer="MyRenderer" />

with in another MyRenderer.mxml file:

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    horizontalAlign="center" verticalAlign="middle"
    width="100%" height="140"
>
    <mx:Image source="@image" mouseMove="callPopup(event)" />
    
	<mx:Script>
		<![CDATA[
			import mx.containers.TitleWindow;
			import mx.managers.PopUpManager;
			
            public function callPopup(e:MouseEvent):void{
               var pop:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, userentry ,true)); 
            }
		
		]]>
	</mx:Script>
    
</mx:VBox>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:

Select allOpen in new window

 

by: su04Posted on 2009-11-04 at 12:13:55ID: 25743428

Awesome solution..Thanks a lot for your kind support..
I'm again attaching new code and XML file.

Sorry for the confusion, Actually I want to show image icon in only few rows(2nd column) depends on the XML data. IF XML has imageURL tag then only image should visible. same thing is happening with other columns.
But If I do
<mx:AdvancedDataGridColumn dataField="@image" headerText="" width="25" temRenderer="CallImage" />
then image is being displayed in all the rows since every time it is rendering.

Also I'm not able to pass imageURL parameter from main MXML to CallImage Renderer since on mousemove event of each image diff-2 image should pop up.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" xmlns:com="*" creationComplete="onCreationComplete()" width="1000" height="650">
<mx:HTTPService id="frameworkService" url="data/arguments.xml" result="frameworkServiceResult(event)" fault="serviceFault(event)" />
	
	<mx:Script>
		<![CDATA[
			import mx.collections.HierarchicalData;
			import mx.collections.XMLListCollection;
			import mx.rpc.events.FaultEvent;
			import mx.rpc.events.ResultEvent;
			import mx.core.IFlexDisplayObject;
            import mx.containers.TitleWindow;
            import mx.managers.PopUpManager;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
			
			[Bindable]
			public var description:String;
			[Bindable]
			public var argumentCollection:XMLListCollection;
			[Bindable]
			public var argumentList:XMLList;
			[Bindable]
			public var argumentData:HierarchicalData;
			
			          
			private function onCreationComplete():void
			{
				frameworkService.send();
			}
			
			private function frameworkServiceResult(event:ResultEvent):void
			{
				var xml:XML = new XML(event.message.body);
				argumentList = xml.category;
				argumentCollection = new XMLListCollection(argumentList);
				argumentData = new HierarchicalData(argumentList);
			}
			
			private function serviceFault(event:FaultEvent):void
			{
				trace(event.fault.faultString);
			}
			
			public function callPopUp(e:MouseEvent):void
			{
            	 var pop:TitleWindow = TitleWindow(PopUpManager.createPopUp(this,PopUp,true)); 
            }
               
		]]>
	</mx:Script>
	
	<mx:Style>
    AdvancedDataGrid {
        folderClosedIcon: ClassReference(null);
        folderOpenIcon: ClassReference(null);
    }
	</mx:Style>
	
	<mx:Text id="descriptionText" text="{description}" x="14" width="500" />
	<mx:AdvancedDataGrid id="frameworkGrid" dataProvider="{argumentData}" variableRowHeight="true" top="{descriptionText.height+21}" right="20" bottom="10" left="20">
		<mx:columns>
			<mx:AdvancedDataGridColumn dataField="@category" headerText="Category" width="400" />
			 <mx:AdvancedDataGridColumn dataField="@image" headerText="" width="25" itemRenderer="CallImage" />
			<mx:AdvancedDataGridColumn dataField="@warning" headerText="" width="20">
				<mx:itemRenderer>
                   <mx:Component>
                            <mx:Image source="@warning" maintainAspectRatio="true" width="10" height="10"/>
                   </mx:Component>
                </mx:itemRenderer>	
			</mx:AdvancedDataGridColumn>
			<mx:AdvancedDataGridColumn wordWrap="true" headerText="" width="80">
			<mx:itemRenderer>
                  <mx:Component>
                   <mx:ComboBox>
                  	<mx:dataProvider>
                        <mx:String>Pending</mx:String>
                        <mx:String>Fail P1</mx:String>
                        <mx:String>Fail P2</mx:String>
                        <mx:String>Fail P3</mx:String>
                        <mx:String>Pass</mx:String>
                        <mx:String>NA</mx:String>
                        <mx:String>Waived</mx:String>
                	</mx:dataProvider>
                    </mx:ComboBox>
                   </mx:Component>
                </mx:itemRenderer>					
			</mx:AdvancedDataGridColumn>
			<mx:AdvancedDataGridColumn dataField="@last_response" itemRenderer="mx.controls.Text" wordWrap="true" headerText="Last Response" />
			
		</mx:columns>
	</mx:AdvancedDataGrid>
</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:
92:
93:
94:

Select allOpen in new window

 

by: su04Posted on 2009-11-05 at 23:34:09ID: 25757312

Please help on it..I don't want to render image every time..
 please suggest anything on this line
<mx:AdvancedDataGridColumn dataField="@image" headerText="" width="25" temRenderer="CallImage" />

Thanks,
Su

 

by: zzynxPosted on 2009-11-06 at 00:13:19ID: 25757459

I think that line is OK.
The change will be needed in your renderer 'CallImage'.
Can I see that code?

 

by: zzynxPosted on 2009-11-06 at 00:19:52ID: 25757482

Btw, are you talking about the 2nd column? (the one on the left of the "white on green" icons)
Because I don't see icons in every row...

 

by: su04Posted on 2009-11-06 at 06:52:54ID: 25759568

Hi,
I'm attaching code of CallImage.

and this screen shot is like mockup..this is how i need second column.

//callImage.mxml 
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    horizontalAlign="center" verticalAlign="middle"
    width="100%" left="200">
  
         <mx:Script>
            <![CDATA[
            import flash.events.MouseEvent; 
            import mx.containers.TitleWindow;
            import mx.managers.PopUpManager;
            import mx.controls.Alert;
            import mx.collections.HierarchicalData;
			import mx.collections.XMLListCollection;
            
            private var point1:Point = new Point();            
            
            [Bindable]
			public var dataField:String = dataField;
			[Bindable]
			public var argumentList:XMLList;
			[Bindable]
			public var argumentData:HierarchicalData;
			
			
            public function callPopup(e:MouseEvent):void{
                var pop:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, PopUp ,true));
                point1.x=img.x;
                point1.y=img.y;                
                point1=img.localToGlobal(point1);
                pop.x=point1.x+15;
                pop.y=point1.y+15;
                //Alert.show(""+data);          
            }
            
                          
                ]]>
        </mx:Script>
  <mx:Image id="img" source="images/imageIcon.png" mouseMove="callPopup(event)"/>
    
</mx:VBox>

                                              
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:

Select allOpen in new window

 

by: zzynxPosted on 2009-11-06 at 07:51:19ID: 25760144

Well, if you write

<mx:Image id="img" source="images/imageIcon.png" mouseMove="callPopup(event)"/>

it's no wonder the icon appears on every row!



       source="images/imageIcon.png"

means it doesn't get the icon out of the XML data, but always displays that icon.

>> IF XML has imageURL tag then only image should visible.
Then I would use

       source = {getIcon()}

with getIcon() returning the icon as specified in your XML or null. In the latter case no icon will appear.

 

by: su04Posted on 2009-11-06 at 08:34:38ID: 25760605

This make sense..thanks.

Finally can you please tell me how to pass parameter from main mxml to CallImage renderer... I'm doing like this <mx:Image id="img" source="@imageURL" mouseMove="callPopup(event)"/>
but image is not appearing.

Thanks a lot for you kind help always.

 

by: zzynxPosted on 2009-11-08 at 11:15:54ID: 25771477

This is how you can pass a parameter to a renderer class:

<mx:AdvancedDataGridColumn id="specialColumn" .... no itemRenderer="" />


var myRenderer:ClassFactory = new ClassFactory(CallImage);
myRenderer.property = ... whatever you need to pass ...;                // <<<<<<<<<<<<< pass parameter here
specialColumn.itemRenderer = myRenderer;

 

by: su04Posted on 2009-11-09 at 06:57:10ID: 25776401

Thanks a lot..I'll check and close this thread.

 

by: su04Posted on 2009-11-09 at 17:51:24ID: 25781806

Please help me to use this code appropriately. I mean where to write this piece of lines to solve my problem.
Can you please place these lines in my attached code, so I'll have better understanding on it.
Thank you very much.

 

by: su04Posted on 2009-11-11 at 18:01:45ID: 25801010

Please help me to close this issue.

 

by: zzynxPosted on 2009-11-11 at 23:41:40ID: 25802199

1) In your CallImage class:

private _myProperty : boolean;   // I don't know what type you need. I take a boolean as example. You better also choose another name


public function set myProperty(prop:boolean):void {
   _myProperty = prop;
}
public function get myProperty():boolean {
  return _myProperty;
}

2) before the closing bracket '>' of <mx:Application you add:  creationComplete="init()"

3) you add a new function in the <mx:Script part of your code:

    public function init():void {
        var myRenderer:ClassFactory = new ClassFactory(CallImage);
        myRenderer.myProperty = true;     // or false (or a String if _myProperty is defined as a String)
        specialColumn.itemRenderer = myRenderer;        
    }

4) As I said before: remove the itemRenderer="..." part out of your DataGridColumn part and replace it by id="specialColumn":

    <mx:AdvancedDataGridColumn id="specialColumn" .... no itemRenderer="" />

 

by: zzynxPosted on 2009-11-13 at 00:08:07ID: 25812151

Thanx 4 axxepting

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...