What object is null? target? target.dataProvider? resizeLarge? We'd need to know how you're setting these.

 

Also, there should be no need to pass a reference to the DataGrid to this method as a 'target' parameter. If the DataGrid has id="myDataGrid", then any method in the same script can just access myDataGrid.

 

- Gordon

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of pdflibpilot
Sent: Saturday, November 04, 2006 6:13 AM
To: [email protected]
Subject: [flexcoders] resize dataGrid using creationComplete

 

I am trying to "grow" the dataGrid to display only as many rows as the
dataProvider contains. I am trying to use the creationComplete to
invoke the ActionScript. Any suggestions as to how to overcome this
problem of a "null object" as noted in my code below.

public function growDG(eventObj:Event,target):void {

// this line is throwing the exception as a null object
var len = target.dataProvider.length;

var endSize = len * 25;
resizeLarge.target=target;

// Set resized width and height, and effect duration.
resizeLarge.startDelay = 1000;
resizeLarge.heightFrom = 50;
resizeLarge.heightTo = endSize;
resizeLarge.duration = 3000;

}

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to