header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Poornima
Points:0
Posts:0

12/6/2010 4:20:15 AM

Title: Datagrid -- Canoot access null object reference


in the below code i am not able to access datagrid when calling a function from popUp a separate title window ......

Please provide solution ASAP



//This fuction will be called from titlwindow after closing popup
public function SearchButtonClick(UserIC:String):void {
				FileDownloadString = UserIC;
				searchEnterClick();
			}



Search function for getting result from server
public function searchButtonClick():void {
				RefTxtInput = null;
				var FileDownloadStringE:String = null;
				//poornima
				if(FileDownloadString != null ) {
					RefTxtInput = StringUtils.stripTags(judgementFileDownloadString);
					judgementFileDownloadString = null;
				}
				else
					RefTxtInput = StringUtils.stripTags(searchTxt.text);
				//Alert.show(userURL.toString());
				if(!RefTxtInput == '' && !StringUtils.isNumeric(RefTxtInput)){
					vS.selectedChild = datagrid;
					counter = 1;
					getSearchEngineForReferencePageResult.token = CommunicationServicesPort.getSearchEngineForReferencePage(RefTxtInput, 15, counter);	
				}else {
					Alert.show('Please Enter Valid Keywords', ' Search');
				}
			} 



// result handler 
private function  CommunicationServicesPort_resultHandler(event:ResultEvent):void{
				
				if (event.token.result as ArrayCollection) { // When result contains more than one string
					str = event.token.result as ArrayCollection;
					 if(str.length <= 15){
						//nextLabel.enabled=false;
						dG.dataProvider = str;
					} 
				}
				else {// When result contains single string or validation message
					str = new ArrayCollection([event.result]);
					if(str[0] == "NULL"){
						str[0]= "                              Sorry! No Search Results Found... Please do search again..........          ";
					}
					 dG.dataProvider = str; 
				}
			}
Thanks & Regards




Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+2 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions