Adobe Dreamweaver Forums



Last 10 THreads :         Re: SFW and date created (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          help me with adjustments layers in CS4 (Last Post : eddie caruso - Replies : 3 - Views : 4 )           »          "Save As" crashes PS (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 3 - Views : 4 )           »          CreateODBCDate and cfqueryparam with cf_sql_date (Last Post : -==cfSearching==- - Replies : 1 - Views : 2 )           »          Change custom Vector class to new Vector class in player10 (Last Post : flexstone - Replies : 2 - Views : 3 )           »          Changing background of image (Last Post : Linda Rathgeber - Replies : 4 - Views : 5 )           »          Spellcheck and CFExecute (Last Post : Fetch - Replies : 1 - Views : 2 )           »          old syntax? (Last Post : David Mainstreet - Replies : 2 - Views : 3 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »         


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



Reply
  #1 (permalink)  
Old 11-04-2008, 09:00 AM
SiHoop
 
Posts: n/a
Diggs:
Default mxml to as3

I'm trying to convert mxml to AS3and have what appear to be two identical
(except for their placement) instances of a datagrid. The one using mxml works.
The one using AS3 does not. The only difference I can see is the use of the
curly braces in the component, but I thought that was accounted for by making
the instance Bindable. What is wrong with the AS3 implementation?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
layout="absolute" creationComplete="init()" >
<mx:Script>
<![CDATA[
import mx.collections.ListCollectionView;
import mx.collections.XMLListCollection;

[Bindable] public var people:XMLListCollection
[Bindable] public var studentsDataGrid:MyDataGrid
[Bindable] private var myXmlList:XMLListCollection
[Bindable] private var myXml:XML;
public function init():void{
var myXml:XML =
<myXml>
<employee>
<name>Fred</name>
</employee>
<employee>
<name>Andy</name>
</employee>
</myXml>;
myXmlList=new XMLListCollection
myXmlList.source=myXml.employee
studentsDataGrid=new MyDataGrid();
studentsDataGrid.dataProvider=myXmlList;
studentsDataGrid.x=100
studentsDataGrid.y=50
}
]]>
</mx:Script>
<MyDataGrid id="studentsDataGrid2" dataProvider="{myXmlList}" x="300" y="50"/>
</mx:Application>

Class:
<?xml version="1.0" encoding="utf-8"?>
<mxataGrid xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:columns >
<mxataGridColumn width="85" dataField="name" />
</mx:columns>
<mx:Script>
<![CDATA[

public function init():void{
trace("here")
}
]]>
</mx:Script>
</mxataGrid>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:00 AM
atta707
 
Posts: n/a
Diggs:
Default Re: mxml to as3

Did you forget to add this newly baked datagrid to some container, in this
application itself?

Something like this.addChild(studentsDataGrid) right after the line:

studentsDataGrid.y=50


ATTA

Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 09:00 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: mxml to as3


"SiHoop" <webforumsuser@macromedia.com> wrote in message
news:gdm4ga$flg$1@forums.macromedia.com...
> I'm trying to convert mxml to AS3and have what appear to be two identical
> (except for their placement) instances of a datagrid. The one using mxml
> works.
> The one using AS3 does not. The only difference I can see is the use of
> the
> curly braces in the component, but I thought that was accounted for by
> making
> the instance Bindable. What is wrong with the AS3 implementation?


Making a property bindable _enables_ you to bind to it. It does not
actually execute any binding.

http://link.brightcove.com/services/...tid=1741212660


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



© 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 11:52 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.
Inactive Reminders By Mished.co.uk