|
Hi all, This is my action script file. Here I am
initializing the variable with some value..but I find it outside that particular
code block it is showing undefined even tthough the variable is global. Can anybody
suggest me how to resolve this problem? import mx.core.UIObject; import
de.richinternet.utils.Dumper; public static var pageItem,printItem : Object; public static var reportItem1,reportItem2 :
Object; public static var
title: String=null; var pages:Number=0; var
loanTermArray=[1,2,3,4,5,6,7,8,9]; var
interestRateArray=[1,2,3,4,5,6,7,8,9]; var
pointsPurchasedArray=[0,1,2,3,4,5,6,7,8,9]; function createUI(
pageUI:String , parentComp:Object):Void { if( pageUI == "formatToolbar" ) {
pageItem = parentComp.createChild( formatToolbar, undefined ); } if( pageUI == "pointsCalci" ) { pageItem = parentComp.createChild(
PointsCalculator, undefined); title='Calculators
: Should I Pay Points?'; Dumper.dump("title
"+title);//here its ok. } if(pageUI ==
"viewPointCalci") pageItem=parentComp.createChild(ViewCalculator,undefined); if(pageUI ==
"viewPointReport") { pageItem=parentComp.createChild(mx.containers.VBox,undefined,{
x:8, y:21, width:465, height:445}); reportItem1=pageItem.createChild(PointCalciReport1,undefined); pages++; reportItem2=pageItem.createChild(PointCalciReport2,undefined); pages++; printItem=pageItem; }
} public function
destroyUI(parentComp:Object):Void { parentComp.destroyChild(
UIObject( pageItem ) ); }
public function
doPrint() { var pj : PrintJob = new
PrintJob(); //Save the current
vertical scroll position of the DataGrid control. var
prev_vPosition:Number = printItem.vPosition; Dumper.dump("vPosition
"+prev_vPosition); if(pj.start() !=
true) { delete pj; return; } //Scroll down each page of rows,
then call addPage() once for each page. for (var i:Number=0;i<pages;i++) { //newItem.vPosition = i*rowsPerPage; var obj1 :
Object = printItem.getChildAt(i); pj.addPage(printItem.getChildAt(i));
//{xMin:-100,xMax:400,yMin:-150,yMax:560}); } pj.send(); delete pj; // Restore vertical scroll position. //newItem.vPosition =
prev_vPosition; } public function
setTitle(titleparam:Object) { Dumper.dump("title
"+this.title);// here title is coming out to be undefined? titleparam.text=title; } Thanks&Regards, Akash Chander, -- 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
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 __,_._,___
|
- [flexcoders] Variable Initialization Problem akash
- RE: [flexcoders] Variable Initialization ... Steve Kellogg @ Project SOC
- Re: [flexcoders] Variable Initializat... Ralf Bokelberg

