| Ultrashock Forums
• Error #2007: Parameter child must be non-null. |
|||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
|
|
|||||||||||||||||||||||||
![]() |
Ultrashock Member Comments:
|
2008-08-06
#2 |
||
|
someone plz reply
|
|
|
2008-08-06
#3 |
||
|
Error #2007: Parameter child must be non-null.
i guess i did not explained the prob. I have viewstack in a viewstack.... when i try to call an mxml component from the child view stack thru parent viewsatck Code:
<mx:Button x="59" y="68" label="GAPs Report - <5 Days Out" width="217" height="65" fontFamily="Georgia" color="#800040" fontSize="15" fontWeight="bold" click="vsrep.selectedChild=vsrepGapTR"/>
TypeError: Error #2007: Parameter child must be non-null. any help is appreciated
at flash.display: isplayObjectContainer/getChildIndex()at mx.core::Container/getChildIndex() at mx.containers::ViewStack/set selectedChild() at TDB/___Button6_click() |
|
|
2008-08-06
#4 |
||
|
that typically means you are trying to access something before it has been defined or exists.
|
|
|
2008-08-07
#5 |
||
|
A viewstack only creates the children as required unless explicitly told to. Try adding the parameter creationPolicy="all" to the ViewStack tag. This forces it to create all the kids so you should be able to access it.
|
|
|
2008-08-07
#6 |
||
|
creationPolicy="all"
I did added the above tag. The error is gone. However when I hit GAPs button it does nothing... Is it because the above tag... Code:
<mx:ViewStack id="vs"
width="793" height="418" creationPolicy="all" selectedIndex="0">
<mx:Canvas>
<mx:Text text="SELECT A REPORTING TAB" fontWeight="bold"
paddingTop="10" paddingLeft="10" height="45" width="386" fontFamily="Georgia" fontSize="20" color="#800040" x="178.5" y="150"/>
</mx:Canvas>
<mx:Canvas id="TRep1" backgroundColor="#f8f8f8" fontWeight="bold" width="793" height="542">
<mx:Text text="TRAFFICING REPORTS" fontWeight="bold" paddingTop="10" paddingLeft="10" x="246.5" y="0" width="322" fontFamily="Georgia" fontSize="20" color="#800040"/>
<mx:Button x="59" y="68" label="GAPs Report - <5 Days Out" width="217" height="65" fontFamily="Georgia" color="#800040" fontSize="15" fontWeight="bold" click="vsrep.selectedChild=vsrepGapTR"/>
<mx:Button x="278.5" y="297" label="Summary Report" color="#800040" fontFamily="Georgia" width="217" height="65" fontSize="15" fontWeight="bold"/>
<mx:Button x="484" y="68" label="Active Campaigns" width="217" height="65" fontSize="15" fontFamily="Georgia" color="#800040" fontWeight="bold"/>
<mx:Button x="109" y="185" label="Blanks" width="217" height="65" fontSize="15" fontWeight="bold" fontFamily="Georgia" color="#800040"/>
<mx:Button x="428" y="185" label="Creative Category" width="217" height="65" fontSize="15" fontWeight="bold" fontFamily="Georgia" color="#800040"/>
</mx:Canvas>
<mx:Canvas id="TRep2" backgroundColor="#f8f8f8" fontWeight="bold" width="793" height="418">
<mx:Text text="PLANNING REPORTS"
fontWeight="bold"
paddingTop="10" paddingLeft="10" x="288" y="10" width="217" fontFamily="Georgia" fontSize="15" color="#800040"/>
<mx:Button x="297" y="68" label="GAP Report - <5 Days Out" width="177" height="31" fontFamily="Georgia" color="#800040" fontSize="10" fontWeight="bold"/>
<mx:Button x="26" y="68" label="Summary Report" color="#800040" fontFamily="Georgia" width="177" height="31" fontSize="11" fontWeight="bold"/>
<mx:Button x="566" y="68" label="LAUNCH Report - Next 5 Days" width="200" height="31" fontSize="10" fontFamily="Georgia" color="#800040" fontWeight="bold"/>
<mx:Button x="26" y="141" label="HOT Report - 5+ Days Out" width="177" height="31" fontSize="10" fontWeight="bold" fontFamily="Georgia" color="#800040"/>
<mx:Button x="566" y="141" label="INCOMING Report - 2 Weeks+ Out" width="200" height="31" fontSize="10" fontWeight="bold" fontFamily="Georgia" color="#800040"/>
</mx:Canvas>
<mx:ViewStack id="vsrep" width="1331" height="751">
<local:GapTR id="vsrepGapTR" width="100%" height="100%" />
<local:ActiveCampaign id="vsrepActiveCampaign" width="100%" height="100%" />
<local:Blanks id="vsrepBlanks" width="100%" height="100%" />
<local:CreativeCategory id="vsrepCreativeCategory" width="100%" height="100%" />
</mx:ViewStack>
</mx:ViewStack>
|
|
|
2008-08-07
#7 |
||
|
Another Question I can create a viewstack ia another viewstack. Do i need to assign any priority to show up. Previously I had click="vs.selectedIndex=vs.numChildren-1" in ViewStack id="vsrep" I took it off.
|
|
|
2008-08-07
#8 |
||
|
I changed the code to call local mxml components in the same viewstack. It worked!!!
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|


7 comments
| 3255 views



isplayObjectContainer/getChildIndex()
Linear Mode
at flash.display:
at mx.core::Container/getChildIndex()
at mx.containers::ViewStack/set selectedChild()
at TDB/___Button6_click()