Try

Alert.show(textVar, ‘Message’)

 

Make sure you have the control imported

 

                import mx.controls.Alert;

 

also make sure that the first argument in the show method (“show” in lowercase, btw) is actual a string type. You may need to use the .toString() method to get there


From: [email protected] [mailto:[email protected]] On Behalf Of learner
Sent: Wednesday, October 18, 2006 10:31 PM
To: [email protected]
Subject: Re: [flexcoders] Why am I getting an "error accessing null property"

 

try tracing the model.currentUser.firstName, trace(model.currentUser.firstName)

and then put this vaule in textfield like:

textid.text  = model.currentUser.firstName

and then

Alert.Show(textid.text);

 

I had come acrros the same problem.

where i could value into trace but while passing to some function , it was null

I tried with this and it worked..It sound wired but its true...

 

Regards,

PS

 

On 10/16/06, boy_trike <[EMAIL PROTECTED]com> wrote:

[Bindable]
public var model:ModelLocator = ModelLocator.getInstance();

private function processLoginResults( event : ResultEvent) : void {
model.currentUser = new Users();
model.currentUser = event.result as Users;
Alert.show(model.currentUser.firstName);
}

snippet of code above,
I get the error in the Alert.show function. What am I doing wrong?

Thanks

Bruce Lomasky

 

__._,_.___

--
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